Python libraries developed to interact with remote servers running different services like FTP, HTTP, SSH can be used to launch/automate different attacks. In this section, we will cover different types of live servers and perform interaction/attacks on those using Python.
What will you learn?
Automating interaction with FTP, SSH, HTTP servers
Automating Nmap scans
References:
FTPlib documentation (https://docs.python.org/3/library/ftplib.html)
Paramiko (http://www.paramiko.org/)
Python-nmap (https://xael.org/pages/python-nmap-en.html)
PExpect documentation (https://pexpect.readthedocs.io/en/stable/)
Labs Covered:
In this lab, you will learn to perform dictionary attacks and automate interaction on the FTP server using the ftplib Python library.
In this lab, you will learn to perform dictionary attacks and automate interaction on the SSH server using the paramiko Python library.
In this lab, you will learn to perform dictionary attacks and automate interaction on the web server using the request and beautiful soup Python libraries.
In this lab, you will learn to automate Nmap scans using Python-nmap Python library.
In this lab, you will learn to automate interaction with an FTP server using the pexpect Python library.
Banner and Information Grabbing
In this lab, you will learn to perform banner grabbing and fingerprinting different services using various Python libraries and socket programming.