Hi, I am getting into to ethical hacking what something I should look for when I use something such as Nmap to scan a system?
Basic ethical hacking techniques
Collapse
X
-
Tags: None
-
You can get information like header, IP software mapping, etc. To network mapping i use one of my tools (Print the port 80 on ipv4 IP range). -
Running nmap with default scripts and versions (-sC and -sV flags) does a decent job at giving you more information on what is running on each scanned port and would be a good place to start.Comment
-
When scanning a target with **Nmap**, you should focus on gathering as much useful information as possible :
### **1. Open Ports & Services**
- Identify which **ports** are open (e.g., `22/TCP` for SSH, `80/TCP` for HTTP).
- Determine what **services** are running (e.g., Apache, Nginx, MySQL, RDP).
- Command:
```bash
nmap -sV -p- <target_IP>
```
- `-sV`: Service detection
- `-p-`: Scan all ports (1-65535)
### **2. Operating System Detection**
- Helps in fingerprinting the target’s OS for further exploitation.
- Command:
```bash
nmap -O <target_IP>
```
### **3. Vulnerability Scanning (Scripts)**
- Use Nmap’s **NSE (Nmap Scripting Engine)** to detect vulnerabilities.
- Common scripts:
```bash
nmap --script vuln <target_IP> # Checks for known vulnerabilities
nmap --script http-enum <target_IP> # Enumerates web directories
nmap --script ssl-enum-ciphers <target_IP> # Checks weak SSL/TLS ciphers
```
### **4. Firewall & IDS Evasion**
- If the target has a firewall/IDS, use stealth techniques:
```bash
nmap -sS -T2 -Pn <target_IP> # Stealth SYN scan, slow timing, no ping
nmap -f --mtu 24 <target_IP> # Fragmented packets to evade detection
```
### **5. UDP Port Scanning**
- Many services run over UDP (e.g., DNS, SNMP, DHCP).
- Command:
```bash
nmap -sU <target_IP> # UDP scan (can be slow)
```
### **6. Output Results for Analysis**
- Save results in different formats for later review:
```bash
nmap -oN normal_output.txt <target_IP> # Normal text
nmap -oX xml_output.xml <target_IP> # XML format (for tools like Metasploit)
nmap -oG grepable_output.txt <target_IP> # Grep-friendly format
```
### **7. Follow-Up Actions**
- **Web Ports (80, 443, 8080)**: Check for web apps, run `nikto`, `dirb`, or `gobuster`.
- **SMB (445)**: Check for EternalBlue or anonymous shares with `smbclient`.
- **SSH (22)**: Check for weak credentials or outdated versions.
- **Database Ports (3306, 5432)**: Test for default credentials or SQL injection.
### **Example Full Scan Command**
```bash
nmap -sS -sV -sC -O -p- -T4 -Pn -oN full_scan.txt <target_IP>
```
- `-sS`: SYN Stealth Scan
- `-sC`: Default NSE scripts
- `-T4`: Aggressive timing
- `-Pn`: Treat host as online (skip ping)Comment
-
First: look for documentation.
Hint: https://nmap.org/
Second: read the documentation. (available in multiple languages)
Third: practice on your network. Be prepared to break your network. Don't break other people's network.
Comment
-
Hey, Jack! I'm brand new to this. Just signed up. I'm keen to learn some basic skills. Is there a forum, blog or directory anywhere that might be beneficial for a complete novice? I'm talking in terms of step-by-step guides to ethical hacking techniques via Kali Linux... Any help would be greatly appreciated. Many thanks!Comment
-
As per my last comment/question... apologies, forgot to tag/quote you! Still learning lol.First: look for documentation.
Hint: https://nmap.org/
Second: read the documentation. (available in multiple languages)
Third: practice on your network. Be prepared to break your network. Don't break other people's network.Comment
Comment