Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Remember, secure encryption, good compression, and truely random data are indistinguishable.

It's best to paste that encrypted payload into a JPG with some bullshit magic headers and upload that to a trusted Exfil pivot instead.

Or, to get SuperMarioKart.rom to work with your chromeApp-XEMU emulator to play during down-time at work, just rename it to SMB.png, and email it you yourself.



  > Remember, secure encryption, good compression, and truely random data are indistinguishable.
Yes, and the only reason the bad guys get away with this is the people who trust signature-based scanning at the perimeter to detect all threats.

One of the hacks I'm most proud of in my whole career was when we were doing a proof of concept at an enterprise client we were being deliberately obstructed by the internal IT group due to politics between their boss and the boss who sponsored our POC. For unrelated trademark-related reasons we were prevented by a third party from having the software on physical media but we had a specific contractual clause agreeing to let us download it for install. So while we had been contractually engaged to provide this software and we had a strict deadline to prove value, the enterprise IT group were preventing us from actually getting it through the virus-scanning firewall to get it installed. What to do?

The scanner looked for the signature of executable or zipped files and blocked them. It would also block any files larger than a certain size. So what I did was write two shell scripts called "shred" and "unshred". "Shred" would take any files you gave it as input, make them into a tarball, encrypt that to confuse the virus scanner and then split it up into chunks small enough to get through the firewall, and "unshred" would reverse this. This almost worked, but I found that the first chunk was always failing to transmit through the firewall. The scanner noticed some signature that openssl was putting at the front of the file when encrypting it. The solution? Change shred to add 1k of random noise to the front of the file and unshred to remove it.

Job done. Our files were transmitted perfectly (I got the scripts to check the md5sum on both sides to be sure), and though the process was slow, we could continue.

The funny thing was the POC was a bake-off versus another (more established) vendor and they couldn't get their software installed until they had done a couple of weeks of trench warfare with enterprise IT. "To keep things fair" the people organising the POC decided to delay to let them have time to install, and eventually the person blocking us from installing was persuaded to change their mind (by being fired), so "shred" and "unshred" could be retired.


  >This almost worked, but I found that the first chunk was always failing to transmit through the firewall
Magic numbers/header scanning or, if it was awhile back, BOM (byte order mark) messing stuff up.


I did basically the same, to get some important CLI tools past the company firewall, just a few months back.

Crazy that this is easier than dealing with the bullshit politics, to get some essentials tools to do my job. German public service is a joke. I quit since.


  >I quit since.
apparently they have too :)


You could have just done ssh reverse shell to a public jump server you control? Might have been easier.


Good compression should still be cryptographically distinguishable from true randomness right?

Sure the various measures of entropy should be high, but I always just assumed that compression wouldn't pass almost any cryptographic randomness test.


not 'good' but maximum compression, yes.


Maximum compression should push ALL the 'work' to the compression alg, leaving essentially (no correlative bits) 'random' data to be decompressed.

Good compression, by definition, would leave small artifacts in the data, biasing it away from "true" randomness.

https://en.wikipedia.org/wiki/Kolmogorov_complexity

https://en.wikipedia.org/wiki/Shannon%E2%80%93Hartley_theore...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: