Live data from Hacker News

Ask HN: How do security researchers know where to look for vulnerabilites?

news.ycombinator.com

11–20 of 31 posts

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#11
post #2

They look everywhere, I think its a case of survivor bias where we only see when they succeed (via published bugs). We don't hear about the thousands of times that they failed to find anything.

This. Very much this. It also depends on the scope.

Eventually you'll find something if you're auditing a product, because you'll start at the application interface layer and work your way down.

No issues with the design of the application (this is end-game 50-75% of the time)?

OK, what about the libraries you've used.

OK, what about the framework you've built on.

OK, what about the web server you're running.

OK, what about other services on the web server you're running.

OK, what about the operating system you're running.

OK, what about the people who administrate the services you're running (this is usually end-game 98% of the time - it's the "auto-win" card if it's in-scope).

And all between the above, you can leverage different holes you found to find more holes in the previous and future steps you've taken.

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#12
Disclaimer: I’m a security engineering consultant, focusing on code review. I’ve been writing software for 15+ years.

Industry knowledge and following trends is useful. Following CVEs reveal problem areas in software. Some industries or entities may not devote much time to security review, leading to buggy code. Some see security only as an expense unfortunately.

Looking for vulns in locations where others have not or are unlikely to look, due to effort or domain knowledge requirements, can be very fruitful.

Directed fuzzing can yield great results. Any sort of parser in a lower language like c or c++ are good targets. Spend manual review time for areas that are unlikely to be reached by the fuzzer. Keep in mind fuzzers aren’t a silver bullet though, and won’t catch everything.

Running static analayzers or grepping for common errors can find quick hits often.

Complex specifications often have many errors when implemented. I’ve heard a few stories of RCE vulns due to buggy X.509 parsers.

Developing a threat model is helpful to find high impact vulns.

Knowledge is also key. Understanding components at the unit and integration level is a must.

After doing security reviews for a while, you develop an intuition of where to look. Every once in a while though, you bump into a SQL injection on a login page, so don’t overlook the simple things.

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#15
There's never just one cockroach.

Likewise, once a technique has been sucessfully used to exploit one piece of software, there's a lot of milage in just trying that technique against everything else.

There's also the "try everything" option of fuzzing; the default tool for this is "afl-fuzz", which is automated once you've set up the target in a suitable configuration.

Generally there are three strategies:

- try to get some executable machine code in from outside and run it (buffer overrun, use-after-free etc)

- look at the set of files and data considered "trusted" and put something untrustworthy in there (XSS, DLL injection, /tmp exploits)

- attack the hardware (JTAG, power analysis, key exfiltration)

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#16
post #2

They look everywhere, I think its a case of survivor bias where we only see when they succeed (via published bugs). We don't hear about the thousands of times that they failed to find anything.

You're right about one thing (they look everywhere) albeit I'm afraid that the cases where they don't find anything are in the minority.

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#17
One of the easiest ways to find bugs is to look at CVE releases in software and identify similar software.

For example, if there's a bug in libfoo's ASN.1 structure parsing, then chances are that any implementation of the same structure parsing is going to have similar or identical bugs. It might not be the same field, but this certainly tends to do well as a strategy for finding bugs in libraries, file format bugs and complex network services.

I can't speak for Google Zero, but from the people I know there, they tend to look at a broad area of interest, research it painstakingly and then drill down deep while the bugs drop out. A good example of this is James Forshaw's work on Windows kernel bugs, which started as looking into the Windows file structure and alternate data streams and has slowly morphed over time into walking through Windows' local attack surface.

Again, people I know who have spent far too much time looking for bugs in specific pieces of software tend to take the deep dive approach as it yields more interesting bugs. The broad at-scale reimplementation approach finds bugs, but they're not as interesting.

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#19
If a security researcher comes from developer and/or system administrator background then he/she uses his/her experiences and habits to guess where to look first.

That's why it is always suggested to start from point zero to be a solid security researcher.

Re: Ask HN: How do security researchers know where to look for vulnerabilites?

#20

Disclaimer: I have been working as a security researcher for +5 years (web and mobile apps) . I personally use tools that report all the activity that a software produces, most of that is TCP or UDP connections. Among the tools that I use are WireShark, Burp Suite and mitmproxy. I also keep myself updated with techniques used by other researchers in other areas by collaborating on different forums and networking even…

This is a great post. Wireshark, burp site, mitm tools are all that I use. You'd be surprised how far you can get with kali/fiddler with most apps.

OWASP also is a great baseline to start recon.

Buto to add on more, most of the time it's because of misapplication or something not following good practice and knowing this is only possible by being in the field for a while.

Post reply on HN