News for hackers. Stuff that matters.
Re:Reverse Engineering a D-Link Backdoor by Nitramp on Sunday October 13, 2013 @10:39AM (#6542719)
Apart from the backdoor, this code seems completely ridden with bugs. E.g.

    if(strstr(header, "User-Agent:") != NULL)
    {
        http_request_t->0xD0 = header + strlen("User-Agent:") + strspn(header, " \t");
    }
Note how you could have a header some includes 'User-Agent:' somewhere back in the value, and the arrive with an entirely incorrect pointer to what you think is the value - strstr just finds the needle anywhere in the haystack, not necessarily at the beginning. This particular piece (AFAICT) cannot be exploited for e.g. overruns or similar, maybe just for a subsequent crash or unexpected behaviour due to lack of input sanitization, but still, crazy strstr juggling on untrusted user input? oh oh.

If the rest of this code looks like that, this should never, ever be exposed to the wild wild web.

Re:Reverse Engineering a D-Link Backdoor by __david__ on Sunday October 13, 2013 @04:27PM (#6544049)
So while you're right that the strstr() is lazy (should probably be a strncmp() or something), it's probably not that big of a deal in this particular case. The worst an attacker could do here is get a weird user agent string, which they could already do by just setting the User-Agent field to something weird...