Git Product home page Git Product logo

anaranjado's Introduction

Anaranjado

Anaranjado

Introduction

When security tools crawls for links within target applications, there are some restrictions while parsing JavaScript files. In specific, during many pentest projects it was seen that some links were hardcoded within JavaScript files, but scanners aren't able to find them.

For example, considering the following HTML file:
<html>
<body><script src="thisIsTest.js"></script> <a href="www.google.com.ar"> Google! </a>
</body>
</html>

And the referenced JavaScript file (thisIsTest.js) is the following:
public void thest(){
  page = "http://www.Encontrame.com.ar";
  for(1;99;){
   page2 = "/foundme.asp";
  }
  page34="http:%2f%2fencontrame2.com%2ftest%3fa%3d2";
  if s == 3{
   line = "jojo";
  }
  page55="http%3a%2f%2fencontrame3.com%2ftest%3fa%3d2";
  while (2){
   do something
  }
  redirect = "/foundme2.asp?a=33";
}

By using Burp to spider the site, the following result was achieved:
[+] http://localhost
  - craul
   - index.html
   - thisIsTest.js
[+] http://www.encontrame.com.ar

By crawling the page using Arachni, the following result was achieved:
[+] http://localhost/craul/index.html
[+] http://localhost/craul/thisIsTest.js
[+] http://localhost/craul/www.google.com.ar

While using Anaranjado, the following result was achieved:
[i]- Hey! This is good, some links were found within JavaScript Files:
http://encontrame2.com/test?a=2 From: http://localhost/craul/thisIsTest.js
/foundme.asp From: http://localhost/craul/thisIsTest.js
http://encontrame3.com/test?a=2 From: http://localhost/craul/thisIsTest.js
http://www.Encontrame.com.ar From: http://localhost/craul/thisIsTest.js
/foundme2.asp? From: http://localhost/craul/thisIsTest.js


Summary
Anaranjado is a scraping tool that identifies URLs within JavaScript files.


Usage
In order to identify JavaScript referenced files within an HTML file, run the following command:
python Anaranjado.py --url http://localhost/

The tool will retrieve all .js files and then will perform scraping to each one. The final result will be a list of identified links within JavaScript files.

In order to scrap a single JavaScript file, run the following command:
python Anaranjado.py --jsUrl http://localhost/craul/thisIsTest.js


Coming Anaranjado is still being developed and this will be happening soon:

  • Bug fixing
  • False positive improvement
  • Regex enhancement
  • New funtionalities
  • Threading
  • Full Crawling

anaranjado's People

Contributors

mmarianus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.