[Wayback/Archive] A bit of perl trickery shows a great example why you should only code you understand.
It explains the innards of a classic trap luring people into execute some obfuscated code, in this case Perl based.
Which makes it yet another testament to not blindly download and execute stuff from the internet.
So be aware when you see obfuscated scripts and things luring you into:
iex ((New-Object System.Net.WebClient).DownloadString(piped through PowerShell.curlpiped through bash, Perl, Python or other scripting languages
Be even more alert when these require elevated access (like running under sudo).
Via: [Wayback/Archive] Leo Bicknell on Twitter: “@jpluimers @IanColdwater Executes “rm -rf /”. This is ancient Perl monks way of teaching people not to run programs they don’t understand as root. … But hey, these days people “curl -o – url | bash”. It’s surprising that isn’t exploited more.”
Which was response to me asking what the below code did that was fully misunderstood by ChatGPT (which is Large Language Model based on a large corpus of natural language, not a small corpus of evil red-team programming language code snippets) to a series of Tweets by Ian Coldwater.





