Re:Hidden Messages in Emojis and Hacking the US Treasury
by benmmurphy on Monday March 17, 2025 @05:00PM
(#43392691)
They mentioned PAM module so maybe the sql injection just allowed bypassing the authorization of a system that was using the PAM module. Like it’s in the realm of possibility that a PAM module that wanted to validate a user against credentials stored in a pg database might shell out to the psql command to do this. Though, the whole thing is very questionable.
Re:Hidden Messages in Emojis and Hacking the US Treasury
by rapind on Monday March 17, 2025 @06:41PM
(#43393479)
Yeah we’re missing some info.
What account were they authenticating with when attaching to psql?
If you have the connection string why does psql even matter, couldn’t you use any client? Or is this a case of your input being forwarded to a running, already authenticated, psql instance?
And finally, why do we need unicode support for schema? I assume it’s because the schema is itself data?
Re:Hidden Messages in Emojis and Hacking the US Treasury
by c45y on Tuesday March 18, 2025 @03:38AM
(#43396649)
In this case PAM is the name of a type of security product and not the Linux PAM system.
Re:Hidden Messages in Emojis and Hacking the US Treasury
by jarebear6expepj on Monday March 17, 2025 @04:58PM
(#43392678)
Your questions are programming language agnostic-- where did your PHP angst come in? And are there specific things in PHP that are problematic and avoidable by using a different Turing complete language?
Re:Hidden Messages in Emojis and Hacking the US Treasury
by marsovo on Monday March 17, 2025 @05:53PM
(#43393105)
PHP has grown up but in its wild youth was notorious for such gems as mysql_escape_string vs mysql_real_escape_string, rather than proper parameterization
It's not so much about Turing as it is libraries and patterns
After all, as I understand it this very issue was caused by escaping SQL rather than parameterizing it
- why a no side-effects function on a database can be used to get lateral access to the whole database instance
- why do you need to validate strings on the database itself and not on the client anyway, heck why are there no type safe way of doing it
- why would you want to execute shell commands from the database itself
- Even if there's a real use case for executing commands like that why is it enabled by default on a regular connection to the database without you specifying a THIS_IS_REALLY_DANGEROUS_BUT_I_PINKY_PROMISE_I_KNOW_WHAT_IM_DOING flag to the connection handshake.
It's not always PHP but there are some kirks that are shrugged off on PHP that makes me really concerned about the reliability of projects coded with it.