Live data from Hacker News

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

news.ycombinator.com

21–30 of 31 posts

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

#21
I haven't done security research for a long time, but the way I did it was to pick a specific category of vulnerability (say, SQL injection) and try to exploit it everywhere you can possibly think of, where there is a potential for input.

Even nowadays, I regularly see people leave their systems open to these super basic input validation vulnerabilities because they only think about doing things right on the surface area, but then they'll have some batch process that analyses log files as a one-off script that is vulnerable if the user has a malicious http header or something like that.

Another way would be to try and think how a particular thing was written and figure out ways you can break it. I found plenty of buffer overflow vulns in custom TCP servers this way, but you can also find less serious things that let you do things you're not supposed to.

For example, an ecommerce business that would let you add an optional service charge allowed negative numbers (to deduct money from the order).

Another online shop had test item ids with negative prices in the database.

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

#22
I used to teach a training on the subject (all the course material is now free at https://github.com/struct/mms). I had a section on ‘where to look’ for vulnerabilities. I started this section off with a scenario: “You’ve checked out the Chrome tree. Where do you start? OK you want to find Javascript interpreter bugs. Whats the first piece of code in Chrome that sees untrusted Javascript?”. Its a trick question. The answer of course is the networking code or the TLS decryption code. But you’ve never go looking there for Javascript interpreter vulnerabilities. The pt of the thought exercise is to introduce the concept of manual taint analysis. Basically understanding how to analyze what code paths and data structures your untrusted inputs could influence or control and then go from there.

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

#23

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…

I feel like black box assessment is highly inferior to white box or whatever it is called, when you have access to source code. Huge waste of time for both company and security specialist. It is only acceptable for ongoing bug bounties.

Am I wrong? I'm not in the field, so I don't really know. I have lots of questions. Is it common for security consultancies to do only white box reviews or this wouldn't be a good decision business-wise? Is it common to charge for fixes to found vulnerabilities during an audit? What if the flaw is in open source library?

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

#24
post #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.

They probably find always anything, but mostly not something very interesting or severe.

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

#25
I am dealing with these problems every day, in my workplace, CCLab, in Hungary.

It is really a hard question, because it depends on several variables. I would say that the most important is the information gathering, if you would like to find a vulnerability in a system. There are several cases when you know that a vulnerability is present just by checking the version numbers. If you would like to find vulnerabilities in bigger systems, you should always search for older unmanaged functions that might be present. This is how a security researcher managed to find a critical vulnerability in a Google service that was used by probably nobody. If I am given the task to search for vulnerabilities in a standalone system, I always search for the functions that are not crucial for the system to work, because they tend to be less tested. If you have the possibility to upload files, then you could find a vulnerability with almost 100 percent certainty. So I would recommend you to spend a significant amount of time testing it. An other good indicator for potential vulnerabilities is when the user input is reflected in any manner. If you have access to the list of the used components, always check, if they have any known vulnerabilities this could be a really handful input, if the vulnerable features of that component are used by the system. If you can turn on options that make the system act in a different way, then you should always test them, because most of the automated scanners are going to miss those vulnerabilities that are only present in certain cases.

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

#26
Since code audits are mostly conducted as an art rather than science with rigorous methodologies, I assume most vulnerabilities locations are just derived from experience and "poking around" work.

If you look at public penetration testing reports [3] seeing there mostly is no section about methodology, it's reasonable to assume that there are rather no true common standards or bodies of knowledge to find security vulnerabilities.

For some application security fields like web application security there are at least some semi-rigorous catalogs [1,2] which can help you to conduct more comprehensive code audits or security tests/audits.

As already mentioned there are already tools which can help you to conduct more professional and thorough code audits through static security source code analyzers or dynamic analysis tools (e. g. valgrind for memory related bugs or afl as an fuzzing tool example). These tools are focusing on implementation bugs, design weaknesses still have to be evaluated manually.

In my opinion the discipline of software security assessments hasn't grown up yet, but there is definitely research going on to improve the situation, e. g. [4] for a research example on finding bugs statically.

[1] OWASP Testing Guide v4: https://www.owasp.org/index.php/OWASP_Testing_Project

[2] OWASP Application Security Verification Standard (ASVS): https://www.owasp.org/index.php/Category:OWASP_Application_S...

[3] https://github.com/juliocesarfort/public-pentesting-reports

[4] Modeling and Discovering Vulnerabilities with Code Property Graphs: https://www.sec.cs.tu-bs.de/pubs/2014-ieeesp.pdf

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

#27
After a while you just get a feel for it.

One of the best heuristics I had when approaching a system for the first time was to start poking at non-core features that were probably bolted on late. Things like management portals whether web or console, user customization settings, anywhere arbitrary files can be fed into the system. Those areas usually very fruitful and what I learned there helped understand and contextualize later research and discoveries in the core components.

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

#28

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…

I feel like black box assessment is highly inferior to white box or whatever it is called, when you have access to source code. Huge waste of time for both company and security specialist. It is only acceptable for ongoing bug bounties. Am I wrong? I'm not in the field, so I don't really know. I have lots of questions. Is it common for security consultancies to do only white box reviews or this wouldn't be a good dec…

Security consultancies will usually do whatever the client asks for, or try and cater exactly for their needs. This may result in either a white box attack or black box.

Usually the test will be done at a fixed price, with a fixed scope (What they are/aren't allowed to test). The result of this will usually be a report detailing the vulns, along with reccommended fixes/remediations and sometimes a 'post-fix test' to check if the company has successfully remediated the issues.

White box testing tends to look at the system/application from an internal-looking out perspective, whereas black box is an outside-in view. Benefits to whitebox being a very thorough assesment of the system but this will be time-consuming and expensive. Blackbox on the otherhand can simulate the likely attacks from an adversarie and sometimes be relatively quick dependent on the systems attack surface.

Hope this helps.

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

#29

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…

I feel like black box assessment is highly inferior to white box or whatever it is called, when you have access to source code. Huge waste of time for both company and security specialist. It is only acceptable for ongoing bug bounties. Am I wrong? I'm not in the field, so I don't really know. I have lots of questions. Is it common for security consultancies to do only white box reviews or this wouldn't be a good dec…

You're not wrong at all. Having access to code is far more efficient. My favorite type of assessment to get is when I get a test env and code access. It is uncommon though, a lot of companies are protective of their source code and don't want to hand it out to machines they don't totally control. In most cases when I get code access I either get a laptop from the client or a VPN and rdp onto a machine they control.

As for charging, I've never been paid based on findings, but based on time. If they fix while I'm testing that is great work by their team, but I'd prefer a stable test env so it's a bit annoying.

Libraries can be an interesting area, I focus my testing on code the client controls and only note known vulns in libraries they use. I have found issues in libraries before and we report it to the client, and work with them to disclose to the vendor if they want.

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

#30

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.

Would those three tools be enough to get started/find some bug bounties?
Post reply on HN