News for hackers. Stuff that matters.
Re:WRT120N fprintf Stack Overflow by Morgawr on Wednesday February 19, 2014 @03:24AM (#7262472)
I'm far from an expert security pentester but I know my basics... and I'm always amazed at how simple these exploits are. Guys, come on, it's 2014, if you're writing C and using strcat/strcpy/sprintf/fprintf/etcetc with non-sanitized input, you're pretty much asking for it.

Even a rookie would spot such mistake and exploit it, it's always among the first obstacles to bypass at local CTFs and it's the #1 exploit that people think about when they think about a "security vulnerability".

Re:WRT120N fprintf Stack Overflow by pjmlp on Wednesday February 19, 2014 @05:35AM (#7262939)
On top of that, if one really needs to use C, then:

- Enable all warnings as errors

- Sanitize all inputs via assertions, or similar

- Provide proper unit tests

- Have a static analyzer configured for the continuous build that breaks the build if issues are found

- Specially don't allow anything to go through the static analyzer that is labeled as undefined or compiler specific according to the ANSI/ISO C standard

- Read MISRA C

Re:WRT120N fprintf Stack Overflow by ksk on Wednesday February 19, 2014 @03:52AM (#7262597)
Well, its not quite that easy for a rookie as you say. Just because you can trigger a buffer overflow bug does not mean you can exploit it. Most modern processors will allow disabling execution with an IP-on-Stack test. Thats assuming you can actually control the IP... , and assuming you can actually deliver the payload in the corrupted program state and not crash the program, etc etc..
Re:WRT120N fprintf Stack Overflow by annnnd on Wednesday February 19, 2014 @05:41AM (#7262951)
Even a rookie would spot this mistake, but he would need to learn a lot before exploiting it. But with a nice target like this one... :)
Re:WRT120N fprintf Stack Overflow by ksk on Wednesday February 19, 2014 @07:26AM (#7263249)
I don't agree that this is a valuable target. AFAIK most consumer routers disable access to the web interface from outside the LAN range (by default).
Re:WRT120N fprintf Stack Overflow by pixl97 on Wednesday February 19, 2014 @10:08AM (#7263951)
And now your weakest device can CSRF remote access back on.

Most people don't take their router in to a repair shop when the get a virus on their computer.

Re:WRT120N fprintf Stack Overflow by Stamy on Wednesday February 19, 2014 @07:36AM (#7263278)
Yes but you can break almost any routers wifi password in 24hrs.
Re:WRT120N fprintf Stack Overflow by sp332 on Wednesday February 19, 2014 @11:27AM (#7264359)
But you have to be in range of the wifi to do it. This isn't something that's going to be a widespread problem.