-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
321 lines (310 loc) · 11.6 KB
/
Copy pathindex.html
File metadata and controls
321 lines (310 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PainPain Ransomware PoC</title>
<link rel="stylesheet" href="web/style.css">
<link rel="icon" href="web/assets/demo.png">
<style>
body { background: var(--bg, #0d0d0d); color: var(--text, #f2f2f2); margin:0; }
.navbar {
position: fixed;
top: 0; left: 0; right: 0;
z-index: 1000;
background: rgba(20,20,20,0.92);
box-shadow: 0 2px 16px #0008;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.7rem 2.5rem;
font-size: 1.1rem;
font-family: inherit;
backdrop-filter: blur(12px);
}
.navbar .logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--accent, #00ffc3);
letter-spacing: 1px;
}
.navbar nav {
display: flex;
gap: 2rem;
}
.navbar nav a {
color: var(--text, #f2f2f2);
text-decoration: none;
font-weight: 500;
transition: color 0.18s;
}
.navbar nav a:hover {
color: var(--accent, #00ffc3);
}
.navbar .cta-btn {
margin-left: 2rem;
padding: 0.5rem 1.3rem;
font-size: 1rem;
}
.hero {
padding: 6.5rem 2rem 2rem 2rem;
text-align: center;
background: linear-gradient(160deg, #111, #1e1e1e);
}
.banner-img {
width: 100vw;
max-width: 100%;
height: 320px;
object-fit: cover;
object-position: center;
display: block;
margin: 0 auto 2.5rem auto;
border-radius: 0 0 2.5rem 2.5rem;
box-shadow: 0 8px 32px #00ffc355;
}
.hero-logo {
width: 120px;
height: 120px;
border-radius: 50%;
box-shadow: 0 4px 32px #00ffc355;
margin-bottom: 1.5rem;
display: none;
}
.hero-title {
font-size: 3rem;
font-weight: bold;
color: var(--accent, #00ffc3);
margin-bottom: 0.5rem;
}
.hero-subtitle {
color: var(--subtext, #aaaaaa);
font-size: 1.3rem;
margin-bottom: 2rem;
}
.cta-btn {
background: var(--accent, #00ffc3);
color: #111;
font-weight: bold;
padding: 0.9rem 2.2rem;
border-radius: 2rem;
font-size: 1.2rem;
border: none;
box-shadow: 0 2px 12px #00ffc355;
transition: background 0.2s, transform 0.2s;
cursor: pointer;
}
.cta-btn:hover {
background: #00e6b2;
transform: translateY(-2px) scale(1.04);
}
.features {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 2rem;
margin: 3rem 0 2rem 0;
}
.feature-card {
background: var(--section, #1a1a1a);
border-radius: 1.5rem;
box-shadow: 0 4px 24px #0006;
padding: 2rem 1.5rem;
width: 270px;
text-align: center;
color: var(--text);
transition: transform 0.15s;
}
.feature-card:hover {
transform: translateY(-4px) scale(1.03);
box-shadow: 0 8px 32px #00ffc355;
}
.feature-icon {
font-size: 2.5rem;
margin-bottom: 0.7rem;
}
.feature-title {
font-size: 1.2rem;
font-weight: bold;
color: var(--accent, #00ffc3);
margin-bottom: 0.5rem;
}
.quickstart, .project-structure, .modules {
background: #181818;
border-radius: 1.2rem;
padding: 2rem;
margin: 2rem auto;
max-width: 700px;
box-shadow: 0 2px 16px #0004;
}
.quickstart h2, .project-structure h2, .modules h2 {
color: var(--accent, #00ffc3);
margin-bottom: 1rem;
}
.quickstart code, .modules code {
background: #222;
color: var(--accent, #00ffc3);
padding: 2px 8px;
border-radius: 4px;
font-size: 1rem;
}
.project-structure pre {
background: #222;
color: #fff;
border-radius: 8px;
padding: 1rem;
font-size: 0.98rem;
overflow-x: auto;
}
.modules ul { margin: 0 0 1.5rem 0; }
.modules li { margin-bottom: 0.5rem; }
.disclaimer {
background: #2a0000;
color: #ffb3b3;
border-radius: 1rem;
padding: 1.2rem 2rem;
margin: 2rem auto 1.5rem auto;
max-width: 700px;
font-size: 1.05rem;
text-align: center;
box-shadow: 0 2px 12px #0003;
}
.footer {
text-align: center;
padding: 2rem;
font-size: 0.95rem;
color: var(--subtext, #aaaaaa);
background-color: #111;
border-top: 1px solid #222;
}
@media (max-width: 700px) {
.navbar { flex-direction: column; padding: 0.7rem 1rem; }
.features { flex-direction: column; gap: 1.2rem; }
.feature-card { width: 95vw; }
.quickstart, .project-structure, .modules { padding: 1rem; }
.banner-img { height: 180px; border-radius: 0 0 1.2rem 1.2rem; }
}
</style>
</head>
<body>
<div class="navbar">
<div class="logo">PainPain</div>
<nav>
<a href="#hero">Home</a>
<a href="#features">Features</a>
<a href="#quickstart">Quick Start</a>
<a href="#structure">Structure</a>
<a href="https://github.com/Mudityadev/PainPain-Ransomware-PoC" target="_blank">GitHub</a>
</nav>
<a href="https://github.com/Mudityadev/PainPain-Ransomware-PoC" target="_blank"><button class="cta-btn">View on GitHub</button></a>
</div>
<div class="disclaimer-alert" style="width:100%;background:linear-gradient(90deg,#ff3c3c 0,#b80000 100%);color:#fff;padding:0.85rem 0.5rem 0.85rem 2.5rem;display:flex;align-items:center;gap:1rem;box-shadow:0 2px 12px #0002;font-size:1.08rem;position:relative;z-index:10;border-radius:0 0 1.2rem 1.2rem;margin-bottom:2.2rem;">
<span style="font-size:1.5rem;line-height:1;margin-right:0.7rem;">⚠</span>
<span>
<b>Disclaimer:</b> This project is for <b>educational and ethical research</b> only.
Do not use on production or unauthorized systems. Authors are not liable for misuse.
</span>
</div>
<div id="hero" class="hero" style="display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; max-width: 1100px; margin: 0 auto;">
<div style="flex: 0 1 380px; display: flex; justify-content: flex-end; min-width: 240px;">
<img src="web/assets/demo.png" alt="PainPain Demo Banner" style="width: 100%; max-width: 340px; height: auto; border-radius: 1.5rem; box-shadow:0 4px 32px #0002;">
</div>
<div style="flex: 1 1 420px; min-width: 260px; display: flex; flex-direction: column; justify-content: center;">
<div class="hero-title" style="font-size:2.3rem;line-height:1.15;margin-bottom:0.7rem;">PainPain Ransomware PoC</div>
<div class="hero-subtitle" style="font-size:1.18rem;line-height:1.6;color:#e0e0e0;">
A modern, modular, and secure proof-of-concept for ransomware research and education.<br>
<span style="color:#ffb3b3;font-weight:500;">For ethical and educational use only.</span>
</div>
</div>
</div>
<div id="features" class="features">
<div class="feature-card">
<div class="feature-icon">🛡️</div>
<div class="feature-title">Modern C2 Architecture</div>
<div>Flask-based HTTP POST C2 server, robust and scalable.</div>
</div>
<div class="feature-card">
<div class="feature-icon">🔒</div>
<div class="feature-title">Full Encryption Cycle</div>
<div>Secure AES encryption/decryption with key management.</div>
</div>
<div class="feature-card">
<div class="feature-icon">🖥️</div>
<div class="feature-title">Realistic GUI</div>
<div>Modern Tkinter GUI with timer, ransom note, and payment instructions.</div>
</div>
<div class="feature-card">
<div class="feature-icon">📦</div>
<div class="feature-title">Modular Python Package</div>
<div>Clean, maintainable, and ready for research or demo labs.</div>
</div>
<div class="feature-card">
<div class="feature-icon">📑</div>
<div class="feature-title">Professional Logging</div>
<div>Colorful, structured logs for both console and file.</div>
</div>
<div class="feature-card">
<div class="feature-icon">⚙️</div>
<div class="feature-title">Configurable & Extensible</div>
<div>.env, type hints, docstrings, and plugin-ready.</div>
</div>
<div class="feature-card">
<div class="feature-icon">🧪</div>
<div class="feature-title">Tested & CI/CD Ready</div>
<div>Unit/integration tests and GitHub Actions workflow.</div>
</div>
</div>
<div id="quickstart" class="quickstart">
<h2>Quick Start</h2>
<ol>
<li>Install requirements: <code>pip install -r requirements.txt</code></li>
<li>Copy <code>.env.example</code> to <code>.env</code> and fill in your config.</li>
<li>Start the C2 server: <code>python c2_server/c2_server_alt.py</code></li>
<li>Run the agent: <code>python main.py -e</code> (select target folder when prompted)</li>
</ol>
<div style="margin-top:1rem; color:var(--subtext); font-size:0.98rem;">See the README for Docker, advanced usage, and more.</div>
</div>
<div id="structure" class="project-structure">
<h2>Project Structure</h2>
<pre><code>PainPain-Ransomware-PoC/
├── main.py # Main CLI entry point
├── ransomware/ # Core package
│ ├── core.py # Orchestrates discovery, encryption, GUI
│ ├── config.py # AppConfig (pydantic)
│ ├── gui/ # GUI logic (Tkinter)
│ ├── gui_main.py # Main GUI entry point
│ ├── crypto/ # Encryption, key management
│ ├── discovery/ # File discovery logic
│ ├── network/ # C2 client logic
│ ├── exceptions.py # Custom exceptions
│ └── ...
├── c2_server/ # C2 server (Flask)
│ ├── c2_server_alt.py # HTTP POST C2 server
│ └── ...
├── testDir/ # Sample/test data
├── tests/ # Unit/integration tests
├── requirements.txt # Python dependencies
├── Dockerfile # Containerization
├── README.md # Documentation
└── ...
</code></pre>
</div>
<div class="modules">
<h2>Module Highlights</h2>
<ul>
<li><b>CLI/Agent:</b> <code>main.py</code> — Entry point for encryption/decryption, CLI options, config loading.</li>
<li><b>Core Logic:</b> <code>ransomware/core.py</code> — Orchestrates key management, file discovery, encryption/decryption, C2 exfiltration, GUI launch.</li>
<li><b>GUI:</b> <code>ransomware/gui/main.py</code>, <code>ransomware/gui_main.py</code> — Tkinter GUI, timer, ransom note, payment instructions.</li>
<li><b>Crypto:</b> <code>ransomware/crypto/</code> — Fernet-based encryption/decryption, key utilities.</li>
<li><b>Discovery:</b> <code>ransomware/discovery/</code> — Recursively finds files, extension filtering.</li>
<li><b>Network:</b> <code>ransomware/network/</code> — Sends exfiltration data to C2 server via HTTP POST.</li>
<li><b>C2 Server:</b> <code>c2_server/c2_server_alt.py</code> — Flask app, receives exfiltration data, logs events.</li>
<li><b>Tests:</b> <code>tests/</code> — Unit and integration tests for all modules.</li>
<li><b>Sample Data:</b> <code>testDir/</code> — Realistic test files for safe demonstration.</li>
</ul>
</div>
<div class="footer">
© 2025 PainPain — Built for ethical hacking & research.<br>
<span style="color:var(--accent);font-weight:bold;">Cybersecurity is not about avoiding threats — it's about understanding them first.</span>
</div>
</body>
</html>