Common tools for the job
Bash
Find contents of a file
grep "content" file.ext
Find file by name
find / -type f -name "name" 2>/dev/null
Search logs:
grep -Ei \"login|auth|user|pass\" *.log
grep -Ei \"@\" *.log
Extract IPs from file:
grep -oE '((1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\\.){3}(1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])' file.txt
grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' file.txt
grep -E -o \"([0-9]{1,3}\\.){3}[0-9]{1,3}\" your_file.txt
Multi line echo
cat << EOF > myfile.txt
Line one
Line two
Line three
EOF
SSH Tunnel
ssh -L 10000:127.0.0.1:10000 user@$IP
PowerShell
Pull remote file
iwr -uri http://$IP/file.txt -Outfile file.txt
search for file by exentsion
Get-ChildItem -Path C:\ -Include *.<ext> -File -Recurse -ErrorAction SilentlyContinue
LOTL
# nc network scanner
for i in $(seq 1 254); do nc -zv -w 1 172.16.50.$i $PORT; done