Apparently downloaded to some WSO variant that allows for encoded data to an eval().
POST parameters:
[pass] => nhzgrf
[a] => NxAcGg==
[p1] => KB8hGjEEMg...
cp -pfiles from/var/tmp/tofiles/- Run
./extract, creating encoded text files in directorydata/ - Run
./uniqit# weed out dupes based on checksum of encoded text files.
File uniqs has file names of unique encoded text files in it.
create_flistcopies files frim/var/tmp/tofiles/, createsflistcksum *php.file | sort -k1.1 | awk 'BEGIN{cksum=0} {if ($1 != cksum) {print $0; cksum = $1}}' | awk '{print $2, $3}' > uniques
File uniques has <size,filename> of unique encoded text files.
Unique enoded text files look like they're Base64-encoded: 76-character
length lines, no-eighth-bit set on any byte,
all printable ASCII letters or numbers, except for ASCII linefeeds,
'+' and '<' characters. The presence of '<' characters is the only
unusual thing - Linux base64 command doesn't use those in encoding,
I don't believe PHP's base64_encode() does either.
See wikipedia's base64 article to puzzle this out.
- Run
./create_dataUses file names inuniqs, puts decoded files inbase64_decoded
Files in directory base64_decoded/ have the decoded unique data blobs in them,
named in file uniqs
base32 -d doesn't work - invalid input
- Run
./icit. This gives fileindex.of.coincidence
- Run
./compress_data
Compare index of coincidence and compression ratio:
join index.of.coincidence compression.ratio | sed 's/ / /g'
It compresses better with larger data files, and index of coincidence goes up.
File test1.php is 3666 bytes of PHP.
Vignere encode it: ./shift -N 127 -s 'abcABC1(&)^@#$%!' -r test1.php > test1.shift
$ ic test1.php
test1.shift 3666 127 0.010
$ gzip -v -c test1.shift > /dev/null
test1.shift: 23.6%
That's pretty similar to the files in base64_decode/.
gunzipdoesn't work - not gzip fileunxzdoesn't work - not xz filebunzip2doesn't work - not a bzip2 fileunlz4- Error 44 : Unrecognized header : file cannot be decodedunlzma- unlzma: base64_decoded/1.179.246.8: File format not recognized
cat base64_decoded/* > all.decodedvigkeylength all.decoded 4 50 > length
Key seems to be a multiple of 8 or 16.
Looks like different keys on different files, maybe?
Considering all files together seems a mistake.
create_flistcopies files from/var/tmp/tofiles/, createsflistcksum files/*php.file | sort -k1.1 | awk 'BEGIN{cksum=0} {if ($1 != cksum) {print $0; cksum = $1}}' | awk '{print $2, $3}' > uniques