<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: security.txt</title>
    <description>The latest articles on Forem by security.txt (@securitytxt).</description>
    <link>https://forem.com/securitytxt</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F162%2Fd51d83bb-f8cc-4a78-9467-bc674d32599d.png</url>
      <title>Forem: security.txt</title>
      <link>https://forem.com/securitytxt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/securitytxt"/>
    <language>en</language>
    <item>
      <title>The poor man’s bug bounty monitoring setup</title>
      <dc:creator>EdOverflow 🐸</dc:creator>
      <pubDate>Sun, 15 Jul 2018 00:00:00 +0000</pubDate>
      <link>https://forem.com/securitytxt/the-poor-mans-bug-bounty-monitoring-setup-5f1f</link>
      <guid>https://forem.com/securitytxt/the-poor-mans-bug-bounty-monitoring-setup-5f1f</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.oldbookillustrations.com%2Fwp-content%2Fuploads%2F2017%2F07%2Ffishing-station.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.oldbookillustrations.com%2Fwp-content%2Fuploads%2F2017%2F07%2Ffishing-station.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fishing station on the shores of the Black Sea&lt;/em&gt; by Jules Laurens&lt;/p&gt;

&lt;p&gt;I must confess, I have been holding on to a small trick that could allow anybody — even those of you that are not into developing and maintaining software — to set up a monitoring system in mere minutes. The reason why I call it the poor man’s monitoring setup is simply to indicate that this setup is not extremely sophisticated, but it does its job beautifully.&lt;/p&gt;

&lt;p&gt;When bug bounty hunters monitor targets, they want to receive indications that something new has appeared or that there is a new instance. This is done so that one can immediately jump onto interesting targets and components, which is particularly useful on competitive bug bounty programmes.&lt;/p&gt;

&lt;p&gt;The main part of this setup relies on &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt;. We want to be able to store results from our reconnaissance tools — such as subdomain-bruteforcing scripts — and be able to quickly see changes. We also need a place to store the output remotely. For this particular example, I will be using private GitHub repositories. Students can get free private repositories on GitHub if you apply here: &lt;a href="https://education.github.com/pack" rel="noopener noreferrer"&gt;https://education.github.com/pack&lt;/a&gt;. Please keep in mind, that there are plenty of alternatives out there, I am just sticking to GitHub for this write-up.&lt;/p&gt;

&lt;p&gt;Once you have your private repository set up, make sure to store all output from your tools that you want to monitor inside of the local Git folder. When done running your tools, your monitoring script should attempt to &lt;code&gt;git commit&lt;/code&gt; the output. The clever thing here is that Git will not commit unmodified files, meaning you will only be able to &lt;code&gt;git commit&lt;/code&gt; files that include newly discovered endpoints. &lt;code&gt;git push&lt;/code&gt; your files to the private GitHub and include a nice commit message, because this will become useful later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733457-f67a872c-8831-11e8-9dce-fd3f1295f324.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733457-f67a872c-8831-11e8-9dce-fd3f1295f324.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that everything is being pushed to GitHub, we want to have a way to be notified about new commits. It turns out, GitHub has a nifty little feature which allows you to send emails to an address whenever there is a new commit on the master branch.&lt;/p&gt;

&lt;p&gt;1) Navigate to &lt;a href="https://github.com/YOUR%5C_USERNAME/REPO/settings/installations" rel="noopener noreferrer"&gt;https://github.com/YOUR\_USERNAME/REPO/settings/installations&lt;/a&gt;;&lt;/p&gt;

&lt;p&gt;2) Under the “Add service” dropdown, look for “email”;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733459-f6af8daa-8831-11e8-9462-846496e0f804.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733459-f6af8daa-8831-11e8-9462-846496e0f804.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) Add your email address in the “Address” field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733471-1daf4896-8832-11e8-9aa0-173bb798012a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F42733471-1daf4896-8832-11e8-9aa0-173bb798012a.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, run the your tools with the Git commit process as a cron job. I wrote the whole thing in a few lines of Bash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ crontab -l
# Edit this file to introduce tasks to be run by cron.
...

0 * * * * /usr/local/bin/scan example.com

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are now ready to go. Sit back and relax. GitHub will now notify you whenever any changes were made via email with a nice diff of the files. So you can be sat in a Caffè somewhere and know straight away when a new endpoint was discovered on your favourite bug bounty target.&lt;/p&gt;

&lt;p&gt;On a side note, I just want to add, please do not perform over-the-top type of scanning when monitoring. Keep things light-weight and prioritise targets.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A lightweight reconnaissance setup for bug bounty hunters</title>
      <dc:creator>EdOverflow 🐸</dc:creator>
      <pubDate>Sun, 29 Oct 2017 00:00:00 +0000</pubDate>
      <link>https://forem.com/securitytxt/a-lightweight-reconnaissance-setup-for-bug-bounty-hunters-1fo1</link>
      <guid>https://forem.com/securitytxt/a-lightweight-reconnaissance-setup-for-bug-bounty-hunters-1fo1</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TA4ymWys--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/18099289/32144906-639add86-bcc0-11e7-9071-bdb1c125257a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TA4ymWys--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/18099289/32144906-639add86-bcc0-11e7-9071-bdb1c125257a.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following is a lightweight reconnaissance setup that should help you quickly gather information on a given target. We will run through the basic installation steps and then take a look at how to use this setup while hunting.&lt;/p&gt;

&lt;p&gt;Please keep in mind that there are hundreds of tools out there and there is no way they could all be included in this write-up. This write-up is targeted towards people getting started or for those that want a simple setup. The author assumes that the reader already has a basic understanding of how to use a terminal. If not, the reader may want to start with &lt;a href="https://linuxjourney.com/"&gt;https://linuxjourney.com/&lt;/a&gt; before reading on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sublist3r
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;📀 Installation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/aboul3la/Sublist3r.git
$ cd Sublist3r
$ sudo pip install -r requirements.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;💬 Aliases&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias sublist3r='python /path/to/Sublist3r/sublist3r.py -d '


alias sublist3r-one=". &amp;lt;(cat domains | awk '{print \"sublist3r \"$1 \" -o \" $1 \".txt\"}')"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  dirsearch
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;📀 Installation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/maurosoria/dirsearch.git
$ cd dirsearch/db
$ wget https://gist.githubusercontent.com/EdOverflow/c4d6d8c43b315546892aa5dab67fdd6c/raw/7dc210b17d7742b46de340b824a0caa0f25cf3cc/open_redirect_wordlist.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;💬 Aliases&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias dirsearch='python3 /path/to/dirsearch/dirsearch.py -u '


alias dirsearch-one=". &amp;lt;(cat domains | awk '{print \"dirsearch \"\$1 \" -e *\"}')"


alias openredirect=". &amp;lt;(cat domains | awk '{print \"dirsearch \"\$1 \" -w /path/to/dirsearch/db/open_redirect_wordlist.txt -e *\"}')"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  webscreenshot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;📀 Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Make sure to install &lt;a href="https://github.com/maaaaz/webscreenshot/wiki/Phantomjs-installation"&gt;PhantomJS&lt;/a&gt; too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/maaaaz/webscreenshot.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Steps to take when approaching a target
&lt;/h2&gt;

&lt;p&gt;1) Verify target’s scope (&lt;code&gt;*.example.com&lt;/code&gt;);&lt;/p&gt;

&lt;p&gt;2) Run Sublist3r on &lt;code&gt;example.com&lt;/code&gt; and output all findings to a file called &lt;code&gt;output&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sublist3r example.com -o output
...
$ cat output
foo.example.com
bar.example.com
admin.example.com
dev.example.com
www.example.com
git.example.com

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Check which domains resolve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ while read domain; do if host "$domain" &amp;gt; /dev/null; then echo $domain; fi; done &amp;lt; output &amp;gt;&amp;gt; domains

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Run webscreenshot on the &lt;code&gt;domains&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python webscreenshot.py -i domains output example
...
$ eog example

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡 Tip: Look for &lt;a href="https://hackerone.com/reports/263902"&gt;404 pages&lt;/a&gt;, login panels, directory listings and old-looking pages when reviewing the screenshots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TI2r7Mur--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/18099289/32145630-3e1b6d6c-bccc-11e7-9ad3-ad4d4a6beb13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TI2r7Mur--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/18099289/32145630-3e1b6d6c-bccc-11e7-9ad3-ad4d4a6beb13.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) Run dirsearch on the &lt;code&gt;domains&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dirsearch-one

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6) Check for open redirects using dirsearch on the &lt;code&gt;domains&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ openredirect

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📝 Exercises
&lt;/h2&gt;

&lt;p&gt;The following tasks are left as exercises for the reader:&lt;/p&gt;

&lt;p&gt;1) Write a shell script that performs the entire process when supplied with a single domain (&lt;code&gt;example.com&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;2) Practice going through the process by picking a couple bug bounty programs on &lt;a href="https://hackerone.com/directory"&gt;HackerOne&lt;/a&gt; and &lt;a href="https://bugcrowd.com/programs"&gt;Bugcrowd&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The author would like to acknowledge the help provided by &lt;a href="https://twitter.com/TomNomNom"&gt;@TomNomNom&lt;/a&gt;. The cover image is by &lt;a href="https://unsplash.com/@joaosilas"&gt;João Silas&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Broken Link Hijacking - How expired links can be exploited.</title>
      <dc:creator>EdOverflow 🐸</dc:creator>
      <pubDate>Sun, 03 Sep 2017 00:00:00 +0000</pubDate>
      <link>https://forem.com/securitytxt/broken-link-hijacking---how-expired-links-can-be-exploited-ghe</link>
      <guid>https://forem.com/securitytxt/broken-link-hijacking---how-expired-links-can-be-exploited-ghe</guid>
      <description>&lt;p&gt;Broken Link Hijacking (BLH) exists whenever a target links to an expired domain or page. Broken Link Hijacking comes in two forms, reflected and stored. This issue has been exploited in the wild numerous times, but surprisingly few researchers actively look for broken links in bug bounty programs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F30001780-873a820e-9098-11e7-9c53-ab746d322fc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F30001780-873a820e-9098-11e7-9c53-ab746d322fc7.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post aims to give you a basic overview of the different issues that could possibly arise if a target links to an expired endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stored Broken Link Hijacking
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Impersonation
&lt;/h3&gt;

&lt;p&gt;When a company deletes their social media account they might forget to remove the link from their website. An attacker can create an account on the social media platform with that username and impersonate the company.&lt;/p&gt;

&lt;h3&gt;
  
  
  External JS File Hijacking
&lt;/h3&gt;

&lt;p&gt;If a target has an external JS file and that domain/page is expired, you can claim it and then you essentially have stored XSS.&lt;/p&gt;

&lt;p&gt;Say for instance example.edu has an external JS file hosted on example.com and example.com has expired.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width"&amp;gt;
  &amp;lt;title&amp;gt;Broken Link Hijacking&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;script src="//example.com/script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can takeover example.com and can control the JS file on example.edu.&lt;/p&gt;

&lt;h3&gt;
  
  
  Information Leakage
&lt;/h3&gt;

&lt;p&gt;Hijacking broken links which are missing the &lt;code&gt;rel="noopener noreferrer"&lt;/code&gt; attribute could leak information to the attacker-controlled page. &lt;a href="https://github.com/cure53/HTTPLeaks" rel="noopener noreferrer"&gt;[1]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also sometimes companies still link to expired analytics pages. If the attacker can hijack that expired page, they can monitor traffic and possibly gather valuable information about the target’s users. Someone actually once found one of these on Gratipay’s program: &lt;a href="https://hackerone.com/reports/111078" rel="noopener noreferrer"&gt;https://hackerone.com/reports/111078&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Hijacking
&lt;/h3&gt;

&lt;p&gt;An attacker can hijack the content of a page by taking over the expired domain/page. A good example of this can be seen in &lt;a href="https://twitter.com/MisterCh0c" rel="noopener noreferrer"&gt;@MisterCh0c&lt;/a&gt;’s blog post &lt;a href="https://hackernoon.com/how-i-hijacked-top-celebrities-tweets-including-katy-perry-shakira-fca3a0e751c6" rel="noopener noreferrer"&gt;“How I hijacked top celebrities tweets including Katy Perry, Shakira…”&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F30002343-55a8dfc4-90a7-11e7-95b2-052bb5a1a5a3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F18099289%2F30002343-55a8dfc4-90a7-11e7-95b2-052bb5a1a5a3.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reflected Broken Link Hijacking
&lt;/h2&gt;

&lt;p&gt;You know that feeling when you think you have reflected XSS, but cannot break out of the &lt;code&gt;href&lt;/code&gt; or &lt;code&gt;src&lt;/code&gt; attributes?&lt;/p&gt;

&lt;p&gt;If the link is a CDN or a file hosting service, you can construct a malicious link and host that file on the service. Admittedly, these are very rare, but definitely something to keep in mind in case you come across this issue in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Scenario
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://example.edu/?version=1.0.0" rel="noopener noreferrer"&gt;http://example.edu/?version=1.0.0&lt;/a&gt; returns a specific version of the JS file being hosted on cdn.example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- http://example.edu/?version=1.0.0 --&amp;gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width"&amp;gt;
  &amp;lt;title&amp;gt;Broken Link Hijacking&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;script src="//cdn.example/1.0.0/script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;cdn.example allows us to add our project and host a malicious JS file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- http://example.edu/?link=maliciouspath --&amp;gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width"&amp;gt;
  &amp;lt;title&amp;gt;Broken Link Hijacking&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;script src="//cdn.example/maliciouspath/script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  broken-link-checker
&lt;/h3&gt;

&lt;p&gt;broken-link-checker will crawl a target and look for broken links. Whenever I use this tool I like to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ blc -rof --filter-level 3 https://example.com/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a while I often find myself adapting it to something like this in order to prevent false positives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ blc -rfoi --exclude linkedin.com --exclude youtube.com --filter-level 3 https://example.com/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Link: &lt;a href="https://github.com/stevenvachon/broken-link-checker" rel="noopener noreferrer"&gt;https://github.com/stevenvachon/broken-link-checker&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  twitterBFTD
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/misterch0c" rel="noopener noreferrer"&gt;misterch0c&lt;/a&gt; released a little script that finds expired domains in tweets.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="https://github.com/misterch0c/twitterBFTD" rel="noopener noreferrer"&gt;https://github.com/misterch0c/twitterBFTD&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;[1] GitHub. (2017). cure53/HTTPLeaks. [online] Available at: &lt;a href="https://github.com/cure53/HTTPLeaks" rel="noopener noreferrer"&gt;https://github.com/cure53/HTTPLeaks&lt;/a&gt; [Accessed 3 Sep. 2017].&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GitHub for Bug Bounty Hunters</title>
      <dc:creator>EdOverflow 🐸</dc:creator>
      <pubDate>Tue, 08 Aug 2017 00:00:00 +0000</pubDate>
      <link>https://forem.com/securitytxt/github-for-bug-bounty-hunters-3g5l</link>
      <guid>https://forem.com/securitytxt/github-for-bug-bounty-hunters-3g5l</guid>
      <description>&lt;p&gt;GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mass Cloning
&lt;/h2&gt;

&lt;p&gt;You can just do your research on github.com, but I would suggest cloning all the target’s repositories so that you can run your tests locally. I would highly recommend @mazen160’s &lt;a href="https://github.com/mazen160/GithubCloner" rel="noopener noreferrer"&gt;GitHubCloner&lt;/a&gt;. Just run the script and you should be good to go.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python githubcloner.py --org organization -o /tmp/output

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Static Analysis
&lt;/h2&gt;

&lt;p&gt;When it comes to static analysis it is very important to start by actually understanding the project you are targeting. Run the project and use the main features. I call this the “Jobert step”, because I have heard that &lt;a href="https://twitter.com/jobertabma/" rel="noopener noreferrer"&gt;Jobert&lt;/a&gt; spends the first 30 minutes of every hunt using the project and understanding the target before finding vulnerabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manual analysis
&lt;/h2&gt;

&lt;p&gt;This is where the “learn to make it, then break it” mentality comes into play. If you can familiarize yourself with a programming language, you should know the ins and outs of what to do and what not to do in terms of security.&lt;/p&gt;

&lt;p&gt;Once you understand the target and its architecture, you can start grepping! Search for keywords that you are interested in, understand best or know that developers tend to mess up. Here is a basic list of some of the keywords I will look for during a general first assessment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API and key. (Get some more endpoints and find API keys.)&lt;/li&gt;
&lt;li&gt;token&lt;/li&gt;
&lt;li&gt;secret&lt;/li&gt;
&lt;li&gt;TODO&lt;/li&gt;
&lt;li&gt;password&lt;/li&gt;
&lt;li&gt;vulnerable 😜&lt;/li&gt;
&lt;li&gt;http:// &amp;amp; https://&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I will focus on terms that make me smile when developers mess things up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSRF&lt;/li&gt;
&lt;li&gt;random&lt;/li&gt;
&lt;li&gt;hash&lt;/li&gt;
&lt;li&gt;MD5, SHA-1, SHA-2, etc.&lt;/li&gt;
&lt;li&gt;HMAC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you get used to certain vulnerability types, you will start knowing exactly what to look for in a specific language. So for instance, when I want to find a timing leak in Java, I know that &lt;code&gt;Arrays.equals()&lt;/code&gt; and &lt;code&gt;HMAC&lt;/code&gt; combined causes that issue.&lt;/p&gt;

&lt;p&gt;Another vital step is to look through the commit history. You will be amazed at the amount of information you can gather from commits. Sometimes I see contributors thinking they have removed credentials, when they stay in the commit history. I have come across old endpoints that still work thanks to the git history. Aside from current issues, you might discover past issues that could potentially be bypassed thanks to old commits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiwn4aquddfztk13w2eze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiwn4aquddfztk13w2eze.png" alt="image" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools
&lt;/h2&gt;

&lt;p&gt;Sometimes automating the boring tasks can help give you a basic overview of what to look for. It is important to note, that you should never copy and paste findings from scanners into your reports. You will get a lot of false positives, therefore you must always look into the possible issue manually to ensure exploitability.&lt;/p&gt;

&lt;p&gt;When I target Python projects, the main tool that I use is &lt;a href="https://github.com/openstack/bandit" rel="noopener noreferrer"&gt;Bandit&lt;/a&gt;. Bandit will find common issues, but will often return low hanging fruit or false positives. So be careful when using it. It should definitely not be relied on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ bandit -r path/to/your/code -ll

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;If you want to find outdated Python modules in a project, paste the contents of the &lt;code&gt;requirements.txt&lt;/code&gt; in &lt;a href="https://pyup.io/tools/requirements-checker/" rel="noopener noreferrer"&gt;https://pyup.io/tools/requirements-checker/&lt;/a&gt;. This will show you if there were any security issues in the specified version of the module.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://snyk.io/test" rel="noopener noreferrer"&gt;Snyk.io&lt;/a&gt; is a wonderful tool for checking dependencies. The platform supports a wide variety of languages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoqkq0py56iyhvynakpd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoqkq0py56iyhvynakpd.png" alt="image" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;For recon, many researchers suggest using &lt;a href="https://github.com/michenriksen/gitrob" rel="noopener noreferrer"&gt;Gitrob&lt;/a&gt;. This tool will look for sensitive information in public GitHub repositories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gitrob analyze acme,johndoe,janedoe

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;For finding high entropy strings (API keys, tokens, passswords, etc.), you can use &lt;a href="https://github.com/dxa4481/truffleHog" rel="noopener noreferrer"&gt;truffleHog&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ truffleHog https://github.com/dxa4481/truffleHog.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;If you are looking for an all-in-one secrets finder, &lt;a href="https://github.com/anshumanbh/git-all-secrets" rel="noopener noreferrer"&gt;git-all-secrets&lt;/a&gt; by &lt;a href="https://twitter.com/anshuman_bh" rel="noopener noreferrer"&gt;@anshuman_bh&lt;/a&gt; is the tool for you. This tool combines multiple open source secrets finders into one big tool.&lt;/p&gt;




&lt;p&gt;For Ruby on Rails apps, I recommend &lt;a href="http://brakemanscanner.org/" rel="noopener noreferrer"&gt;Brakeman&lt;/a&gt;. Brakeman is a static analysis security scanner that can find a ton of various security issues in code.&lt;/p&gt;




&lt;p&gt;Use &lt;a href="https://github.com/GerbenJavado/LinkFinder" rel="noopener noreferrer"&gt;LinkFinder&lt;/a&gt; by &lt;a href="https://twitter.com/gerben_javado" rel="noopener noreferrer"&gt;Gerben Javado&lt;/a&gt; to find endpoints in the JS files of the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python linkfinder.py -i 'path/to/your/code/*.js' -r ^/api/ -o cli

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Social Engineering
&lt;/h2&gt;

&lt;p&gt;OK, seriously do not social engineer the project owners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reporting your Findings
&lt;/h2&gt;

&lt;p&gt;As always when it comes to bug bounty hunting, read the program’s policy thoroughly. Very rarely does a program accept reports through GitHub. Contact the security team or if possible use a bug bounty platform such as &lt;a href="https://www.hackerone.com/" rel="noopener noreferrer"&gt;HackerOne&lt;/a&gt; or &lt;a href="https://www.bugcrowd.com/" rel="noopener noreferrer"&gt;Bugcrowd&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On a side note, a cool thing about white-box testing is that since you have access to the code it can be easier to suggest a fix or submit a patch. 😉&lt;/p&gt;

</description>
      <category>github</category>
      <category>bounty</category>
      <category>bugs</category>
    </item>
  </channel>
</rss>
