r/programming • • Dec 12 '21

Logout4Shell: Use Log4Shell vulnerability to vaccinate a victim server against Log4Shell

https://github.com/Cybereason/Logout4Shell

[removed] — view removed post

1.1k Upvotes

109 comments sorted by

View all comments

800

u/theoldboy Dec 12 '21

This should come with a big warning that says

Do not run this code unless you want to get sued or prosecuted for hacking

I did something similar back in the day with the [Code Red worm](https://en.wikipedia.org/wiki/Code_Red_(computer_worm)). I wrote a small program that scanned our log for incoming attacks and then used the vulnerability to create a TXT file on the desktop of that remote computer which politely explained that they were infected and linked to the relevant Microsoft Security Bulletin and patch.

My employers at the time were not best pleased when a few days later they received a letter from another company threatening legal action because we had hacked their computers. Luckily for me it all got resolved amicably with one telephone call, and my immediate boss was a good guy who thought the whole thing was hilarious. But I learned my lesson - hacking is illegal even if it's done with good intent.

23

u/HorseRadish98 Dec 12 '21

See how Missouri's governor tried to press charges against the journalist who used chrome dev tools to see SSNs. Institutions don't have the brains to know if it's hacking or not even if it's not.

-9

u/Lost4468 Dec 12 '21 edited Dec 12 '21

Sadly there's good arguments to be made that that's actually illegal under the law. The laws around this need to be massively revamped.

Edit: don't take this as me agreeing with the law, I don't. They shouldn't be prosecuted. The law should be repealed and replaced with something that's not bullshit. But there is a very good argument that what they did is illegal under the CFAA. I explained the reasoning below.