OSCP/TryHackMe

[Linux] Network Service

우와해커 2020. 6. 5. 14:36

SMB
SMB - Server Message Block Protocol - is a client-server communication protocol used for sharing access to files, printers, serial ports and other resources on a network.

smbclient //10.10.10.2/secret -U suit -p 445 



Telnet
Telnet is an application protocol which allows you, with the use of a telnet client, to connect to and execute commands on a remote machine that's hosting a telnet server


FTP
File Transfer Protocol (FTP) is, as the name suggests , a protocol used to allow remote transfer of files over a network. It uses a client-server model to do this, and- as we'll come on to later- relays commands and data in a very efficient way.


Active vs Passive

The FTP server may support either Active or Passive connections, or both. 

In an Active FTP connection, the client opens a port and listens. The server is required to actively connect to it. 
In a Passive FTP connection, the server opens a port and listens (passively) and the client connects to it. 

This separation of command information and data into separate channels is a way of being able to send commands to the server without having to wait for the current data transfer to finish. If both channels were interlinked, you could only enter commands in between data transfers, which wouldn't be efficient for either large file transfers, or slow internet connections.


* FTP와 TELNET은 평문전송하므로 ARP포이즈닝 공격으로 암호가 노출될 수 있다.

 

http://www.jscape.com/blog/bid/91906/Countering-Packet-Sniffers-Using-Encrypted-FTP'

 

 

Hydra 

* 크래킹 시도시 계정 대소문자 구분함으로 주의
* mike는 되는데 Mike는 안됨

Hydra is a very fast online password cracking tool, which can perform rapid dictionary attacks against more than 50 Protocols, including Telnet, RDP, SSH, FTP, HTTP, HTTPS, SMB, several databases and much more.

hydra -t 4 -l dale -P /usr/share/wordlists/rockyou.txt -vV 10.10.10.6 ftp

 

Let's break it down:

hydra                        Runs the hydra tool
-t 4                          Number of parallel connections per target
-l [user]                     Points to the user who's account you're trying to compromise
-P [path to dictionary]  Points to the file containing the list of possible passwords
-vV                           Sets verbose mode to very verbose, shows the login+pass combination for each attempt
[machine IP]               The IP address of the target machine
ftp / protocol             Sets the protocol