Backdoor Lab - Hsanokklis/2022-2023-Tech-journal GitHub Wiki
Summary:
Part 1: Getting a command (CMD) shell
Objective: Understand how APT allows access into a corporate network.
Discussion: It is important to understand how attackers are able to obtain a shell on a remote system since it is common method of maintaining access and stealing data (exfiltration or exfil). netcat is a simple but powerful program for establishing connections. netcat derives it’s name from the linux command for typing the contents of files: cat (short for concatenate – join)
1. Change your Kali hostname
-
type sudo nano /etc/hostname into terminal
-
Change kali to hsanokklis
- save the file with command x and then restart your VM
2. Connect to someone's computer on port 8001
On Bob’s computer, a listener (-l) (lower case L) is started on port 8001 and anyone that connects to it will get a command prompt on Bob's computer. The -v is for verbose mode. It is always a good option so you know what is going on as the shell is being setup.
- have partner type command nc -lvp 8001 (to open port)
Me connected to Lily:
Lily connected to mine:
- Connecting to Antonios part 2
On Bob’s computer, a listener (-l) (lower case L) is started on port 8001 and anyone that connects to it will get a command prompt on Bob's computer. The -v is for verbose mode. It is always a good option so you know what is going on as the shell is being setup.
Antonios