News for hackers. Stuff that matters.
Re:Perl code that is syntactically correct only on Fridays by lloeki on Wednesday February 16, 2022 @09:57AM (#30360759)
Bash even reads the file as it goes, so if you run a "long-running" script (a sleep is enough), edit far enough down, and write the file again, the previously started bash will end up running the new content once it gets up to reading where the change happened.
Re:Perl code that is syntactically correct only on Fridays by saba2008 on Wednesday February 16, 2022 @11:15AM (#30361882)
You can exploit it do distinguish whenever script is `curl | bash`'ed.

Add `sleep 1`, and detect pause on server. Then, if pause detected - serve attack payload. If not - somebody is careful enough to download and audit, so serve just the script.

Re:Perl code that is syntactically correct only on Fridays by jwilk on Wednesday February 16, 2022 @11:45AM (#30362242)