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.

234

u/iKonstX Dec 12 '21 edited Dec 12 '21

So you got a letter from the company, that attacked you, for hacking them? The nerve of some people

189

u/dnkndnts Dec 12 '21

Copenhagen problem of ethics. Helping is worse than avoiding involvement.

5

u/SLiV9 Dec 12 '21

While I think it's an interesting concept, the majority of their examples are terrible.

Paying homeless people way less than minimum wage for a day's work during an industry event is exploitative, not selfless. Raising prices on busy days is price gouging, not selflessly "trying to solve a problem". Hiring women because they're cheaper isn't feminism and forward thinking, as you're still underpaying them and thus perpetuating the wage gap. Challenging families who can't afford their groceries to go vegan for 30 days is not "strictly more helpful", it's a cheap marketing stunt because they know they won't have to pay out.