The Bug Hunter Podcast 5: Recon workflow & Out of the box thinking in day-to-day life
Posted in Podcast on April 1, 2019
Posted in Podcast on March 18, 2019
Hi, here’s a new episode of the Bug Hunter podcast!
You can now listen to it using the widget below or on the following platforms: Apple podcasts/iTunes, Google Podcasts, Podbean, Anchor, Spotify, Breaker, Pocket Casts, Overcast and RadioPublic.
If your favorite podcasting app is missing from this list, please let me know so I can add it.
Also, if you prefer written text, you’ll find the whole transcript below. It’s also helpful for finding any links or commands mentioned in the audio.
Hey hackers! This is the Bug Hunter podcast by Pentesterland. The podcast for pentesters & bug bounty hunters.
We tackle technical questions & inspirational topics to help you develop both a hacker skillset & mindset.
Welcome to episode 4! I’m you host, Mariem. And the title of this episode is: “Bypassing email filters & Thinking out of the box”.
Today, I have two segments called:
I’m very excited about this one. I reached out to several hackers and many of them responded with awesome advice. I can’t wait to tell you all about it!
Before we start, the transcript for this episode is on pentester.land/categories/podcast/. Under episode n°4, you’ll find this show’s transcript, including any links or tools I mention.
I’m always advocating for using a personal knowledge base and pentest checklists. But the truth is any checklist has its limits. It’s only one part of the puzzle. Another big part is out of the box thinking. The ability to come up with new ideas you haven’t seen anywhere before which may be unique to the specific environment you are testing at the moment.
But how to develop out of the box thinking? Is it a talent some people are born with and others are not? Is it something we can work on using specific steps and tools?
These are the questions that I wanted to explore in this podcast. A couple of weeks ago, I was traveling by train, without my laptop, and brainstorming this topic in my head. Then it hit me, wouldn’t it be great to ask other hackers and bug hunters what they thought? And then to give you a compilation of their tips and advice?
So, because I was traveling, and knew I wouldn’t have much time to think about the questions, I just wrote in my phone the first 3 questions that came to my mind, which are:
I sent them to some of the best bug hunters I follow on Twitter. To be honest, I didn’t expect to get as many answers. Or that they would be so detailed.
Except 2 of them, I hadn’t spoken to them before. They didn’t know me nor Pentester Land. So I’m very very grateful to those who responded who are: @zseano, Nicolas Grégoire @Agarri_FR, Somdev Sangwan @s0md3v, Ed @EdOverflow, Gwendal Le Coguic @gwendallecoguic, and Eray Mitrani @ErayMitrani.
These guys are awesome and so generous with their knowledge! Their answers were so amazing and detailed, that summarizing them in this short podcast wouldn’t do them justice. So what I’m going to do in this episode is a summary of their tips on how to think out of the box. Then I’m also going to share their full answers as blog posts on Pentester.land in the next few weeks. This way, you’ll have all the information. And I will be able to add any additional advice I get from other hackers who wanted to participate but weren’t available until then.
So… that was a unusually long introduction! Without further ado, here are some ideas on how to think differently and differentiate yourself as a bug hunter.
The first question is…
Some tips to get better at find new valid bugs are:
The second question is:
The third and last question is:
Many bug hunters call themselves security researchers. But it’s different. Research involves more in-depth knowledge of a specific topic and exploring new questions to find new kinds of bugs, not just new bug instances of known vulnerability types. To do research, you need to:
Woah! That was a lot of information. There are so many gems in these pieces of advice! I can’t thank the hackers who helped me with this enough!
But remember that if you want to really benefit from this, you need to apply these tips. Pick one that you like and think is missing from what you are doing and start with it.
Also if you’re visual like me, check out this podcast’s transcript on the blog. And keep an eye for the AMAs I’ll publish in the next few weeks. They will have more details and give you more time to digest all this information.
Today’s question comes from Neel, who sent us an email saying:
Hi, I was reading your Tip of the week of @intigriti, it says we can use round brackets to inject xss/sqli/rce payloads. I understand what they are trying to say but don’t know how to use it practically. Can you please help me to understand how to use it in real time to find bugs using this technique. Thank You
First of all, thank you Neel for your question and really sorry for taking so much time to respond. I hope to make up for it now.
For anyone who is listening and doesn’t know what this is about… it’s a tip by @securinti I mentioned in The 5 Hacking NewsLetter n°34. You will find the link in the show’s transcript. If you can’t check it out because you’re driving or something, no problem, I will explain everything.
This tip is a technique for bypassing email fiters. It’s useful when you are testing any app whether it’s a Web app or mobile app, where you have an email field.
Let’s say you have a form with many fields: full name, username, password, email, address… And you want to test this form against injection vulnerabilities like XSS, SQL injection, HTML injection, SSTI, etc.
You enter your payloads with special characters like '
"
,[
, <
… And you put these payloads in all the fields, but the app tells you: “No! This is not a valid email”. Because it’s expecting emails in a particular format, probably checking what you give it against a regex. And the email you entered was something like: jane'"><@gmail.com
. Special characters are not allowed in the email field.
So what do you do in this case? The first thing to check is whether this is a client-side or server-side validation.
If you copy/paste your payloads into the form and get an error even before submitting the form, it means that client-side validation is in place. It’s a good security measure but you can easily bypass it.
Enable Burp proxy or ZAP proxy, fill up the form with valid data and submit it. For the email field, put something that looks like a real email, like [email protected]
. It doesn’t need to exist.
Then once the request is intercepted by Burp, modify it to replace all values with your payloads. In the email parameter, replace [email protected]
with your payload containing special characters. Then send the request.
By doing this, intercepting the request with Burp and modifying it on the fly, you bypass any client-side validation, any JS code that checks that you filled up the form with valid data.
And if the app isn’t well secured, this might be enough to put whatever you want into the email field and test for injection attacks.
But if the server still responds with an error saying that the email isn’t valid, it means that validation is done server-side. The server only accepts emails that are valid, with no special characters.
And here comes the ingenious trick by Inti: Even if the server checks the format of the email and only allows valid ones, it is still possible to inject special characters!
To do that, write a valid email like: [email protected]
. Then between jane
and at
, add round brackets and put whatever payload with special characters you want inside them.
So the email will look like: jane('"><script>alert(2)</script>)@gmail.com
.
Basically, put your payload between round brackets. It tricks the server into thinking it’s a valid email while you can still inject any special characters to test for injection attacks.
This trick is easily the best thing I’ve learned this whole year. It’s so simple and useful, and opens up the attack surface.
I’d love to know how Inti came up with it, because this kind of tricks is how you find bugs that everyone else is missing!
I don’t have a joke this time, but one term that I’ve only discovered recently: It’s Beg bounty, a contraption of the verb “beg” as in asking for money, and “bug bounty”. It’s when someone tests a network or site without permission, then asks to be paid for it. So it’s like begging.
I think it’s fun having a term for that. It’s very specific.
But please, don’t do this. Testing apps without permission is always risky, and it’s providing a service the company didn’t even ask for. You’d have more chance to get threats than money, and it’s not cool. Critical bug are much cooler!
That’s it for today guys!
Thanks for listening to The Bug Hunter podcast by PentesterLand. If you like what you just heard, please share with your friends and colleagues, like, subscribe and comment.
Also, send your questions and suggestions by DM on Twitter at twitter.com/pentesterland or send us an email to [email protected].
See you next time! Keep on hacking!
If you enjoyed reading this, please consider sharing it, leaving a comment, suggestions, questions…