4 ms·
Searching for the text "strcmp" finds a static string that is referenced in the sub_ED7D94 function. Looking at the strings output, we can see some interesting
by gzer0 5y ago
Searching for the text "strcmp" finds a static string that is referenced in the sub_ED7D94 function. Looking at the strings output, we can see some interesting string references, including auth_admin_ssh_special and auth_admin_internal. Searching for auth_admin_internal finds the sub_13DBEC function. This function has a strcmp call that is not present in the 6.3.0r19b firmware:
The argument to the strcmp call is <<< %s(un='%s') = %u, which is the backdoor password, and was presumably chosen so that it would be mistaken for one of the many other debug format strings in the code. This password allows an attacker to bypass authentication through SSH and Telnet.
[1] is the backdoor. [2] is more details regarding discovery.
[1] https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/ssh/juniper_backdoor.rb https://github.com/rapid7/metasploit-framework/blob/master/m...
[2] https://blog.rapid7.com/2015/12/20/cve-2015-7755-juniper-screenos-authentication-backdoor https://blog.rapid7.com/2015/12/20/cve-2015-7755-juniper-scr...
- samuel 5y agoThat's one of them, and the least interesting of both. I remember that the other one was way more concealed and involved a global variable or something like that and it didn't seemed that the code was doing what was actually doing. There was an amazing blog entry which explained it, but can't find it right now. Edit: I don't think this was the one I read, but it's similar. https://cryptologie.net/article/316/junipers-backdoor/ https://cryptologie.net/article/316/junipers-backdoor/ Basically, Dual EC was chained to another PRNG, so the output should have been robust to crypto vulnerabilities discovered in any of both. The thing is: the second one was never called, because the for's index(a global variable) was set to 32 inside a function call, so the loop never run.