Posts

Showing posts from November, 2019

Reverse Shell in TCP using Python

Image
  Code Example To gain control over a compromised system, an attacker usually aims to gain interactive shell access for arbitrary command execution. With such access, they can try to elevate their privileges to obtain full control of the operating system. However, most systems are behind firewalls and direct remote shell connections are impossible. One of the methods used to circumvent this limitation is a reverse shell. # How its Work? In a typical remote system access scenario, the user is the client and the target machine is the server. The user initiates a remote shell connection and the target system listens for such connections. With a reverse shell, the roles are opposite. It is the target machine that initiates the connection to the user, and the user’s computer listens for incoming connections on a specified port. The primary reason why reverse shells are often used by attackers is the way that most firewalls are configured. Attacked servers usually allow connections only on s

Port Scanner using Python

Image
  Code Example What are Network Ports? Network ports are the communication endpoints for a machine that is connected to the Internet. When a service listens on a port it can receive data from a client application, process it, and communicate a response.  Port scanning is part of the first phase of a penetration test and allows you to find all network entry points available on a target system. Common TCP Ports Listing : 21 - FTP (File Transfer Protocol) 22 - SSH (Secure Shell) 23 - Telnet 25 - SMTP (Mail) 80 - HTTP (Web) 110 - POP3 (Mail) 143 - IMAP (Mail) 443 - HTTPS (Secure Web) 445 - SMB (Microsoft File Sharing) 3389 - RDP (Remote Desktop Protocol) To Run port scanner:  (venv) C:\Users\kuntal\Desktop\New folder\code-example\Port Scanner>python portscanner.py 192.168.1.103 Screenshot : Click Here For Raw Code Quiz Level 1 Quiz Level 2 Request Me