Git Product home page Git Product logo

joomscan's Introduction

Version 0.0.7 Perl GPLv3 License Twitter Leader Leader
Black Hat Arsenal USA Black Hat Arsenal ASIA

======

OWASP JoomScan Project

OWASP Joomla! Vulnerability Scanner (JoomScan) is an open source project, developed with the aim of automating the task of vulnerability detection and reliability assurance in Joomla CMS deployments. Implemented in Perl, this tool enables seamless and effortless scanning of Joomla installations, while leaving a minimal footprint with its lightweight and modular architecture. It not only detects known offensive vulnerabilities, but also is able to detect many misconfigurations and admin-level shortcomings that can be exploited by adversaries to compromise the system. Furthermore, OWASP JoomScan provides a user-friendly interface and compiles the final reports in both text and HTML formats for ease of use and minimization of reporting overheads.
OWASP JoomScan is included in Kali Linux distributions.

WHY OWASP JOOMSCAN ?

Automated ...
*Version enumerator
*Vulnerability enumerator (based on version)
*Components enumerator (1209 most popular by default)
*Components vulnerability enumerator (based on version)(+1030 exploit)
*Firewall detector
*Reporting to Text & HTML output
*Finding common log files
*Finding common backup files

INSTALL

git clone https://github.com/rezasp/joomscan.git
cd joomscan
perl joomscan.pl

For Docker installation and usage

# Build the docker image
docker build -t rezasp/joomscan .

# Run a new docker container with reports directory mounted at the host
docker run -it -v /path/to/reports:/home/joomscan/reports --name joomscan_cli rezasp/joomscan

# For accessing the docker container you can run the following command
docker run -it -v /path/to/reports:/home/joomscan/reports --name joomscan_cli --entrypoint /bin/bash rezasp/joomscan

JOOMSCAN ARGUMENTS

Usage:	joomscan.pl [options]

--url | -u <URL>                |   The Joomla URL/domain to scan.
--enumerate-components | -ec    |   Try to enumerate components.

--cookie <String>               |   Set cookie.
--user-agent | -a <user-agent>  |   Use the specified User-Agent.
--random-agent | -r             |   Use a random User-Agent.
--timeout <time-out>            |   set timeout.
--about                         |   About Author
--update                        |   Update to the latest version.
--help | -h                     |   This help screen.
--version                       |   Output the current version and exit.

OWASP JOOMSCAN USAGE EXAMPLES

Do default checks...
perl joomscan.pl --url www.example.com
or
perl joomscan.pl -u www.example.com

Enumerate installed components...
perl joomscan.pl --url www.example.com --enumerate-components
or
perl joomscan.pl -u www.example.com --ec

Set cookie
perl joomscan.pl --url www.example.com --cookie "test=demo;"

Set user-agent
perl joomscan.pl --url www.example.com --user-agent "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
or
perl joomscan.pl -u www.example.com -a "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"


Set random user-agent
perl joomscan.pl -u www.example.com --random-agent
or
perl joomscan.pl --url www.example.com -r

Set proxy
perl joomscan.pl --url www.example.com --proxy http://127.0.0.1:8080
or
perl joomscan.pl -u www.example.com --proxy https://127.0.0.1:443


Update Joomscan...
perl joomscan.pl --update

OWASP PAGE

https://www.owasp.org/index.php/Category:OWASP_Joomla_Vulnerability_Scanner_Project

GIT REPOSITORY

https://github.com/rezasp/joomscan

ISSUES

https://github.com/rezasp/joomscan/issues

PROJECT LEADERS

  • Mohammad Reza Espargham [ reza[dot]espargham[at]owasp[dot]org ]
  • Ali Razmjoo [ ali[dot]razmjoo[at]owasp[dot]org ]



OWASP JoomScan introduction (Youtube)

OWASP JoomScan introduction

joomscan's People

Contributors

ajdumanhug avatar ali-razmjoo avatar davidangelos avatar duraki avatar ende avatar extrem0us avatar gdestuynder avatar hack-tramp avatar jcesarstef avatar mostafahussein avatar multiflexi avatar pes-soft avatar random-robbie avatar rezasp avatar voidz0r avatar yuya-miyoshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joomscan's Issues

Bug - Target is not alive

This issue is raised after I published Joomla update on our production env. Either there is something wrong with --timeout parameter (not registered) or core is not functioning properly.

Target: http://www.example.com/

$ ./joomscan/joomscan.pl  -u http://www.example.com/ --timeout 50000

    ____  _____  _____  __  __  ___   ___    __    _  _
   (_  _)(  _  )(  _  )(  \/  )/ __) / __)  /__\  ( \( )
  .-_)(   )(_)(  )(_)(  )    ( \__ \( (__  /(__)\  )  (
  \____) (_____)(_____)(_/\/\_)(___/ \___)(__)(__)(_)\_)
                        (1337.today)

    --=[OWASP JoomScan
    +---++---==[Version : 0.0.6
    +---++---==[Update Date : [2018/08/08]
    +---++---==[Authors : Mohammad Reza Espargham , Ali Razmjoo
    --=[Code name : #BHUSA
    @OWASP_JoomScan , @rezesp , @Ali_Razmjo0 , @OWASP

Processing http://www.example.com/ ...



[+] FireWall Detector
[++] Firewall not detected

[+] Detecting Joomla Version
[++] The target is not alive!

Components scan output issues

Hi,

Components scan output is assigned to config.php.x file scan in reports, but it should have a separate section:

[+] Checking sensitive config.php.x file
[++] Readable config files are not found
[++] components are not found

It could also have a separate "Checking components ..." line in output ( so it is logged that it has been performed ).

Thanks

Running from other directory

Hi,

If joomscan is called from directory, where is reports sub-dir does not exist, reports are not saved, but output stitll shows the message: Your Reports : reports/$target.

It should be mentioned when scan is started that no reports will be created because of the missing directory, or directory should be created.

Thanks.

Robots.txt path incorrect when Disallow is empty

Hi,
If robots.txt contains Disallow line with no path, joomscan incorrectly displays the interesting path.
robots.txt:

User-agent: *
Disallow:

Output:

[++] robots.txt is found
path : http://target.example.org/robots.txt 

Interesting path found from robots.txt
http://target.example.orgisallow:

Red color for detected issues in HTML

Hi,

To attract more attention to the issues in HTML reports, I'd suggest to display negative results from security perspective in red color. Currently this is reversed - for example if no backup file is found, the message is red.

Thanks.

improve code quality

The current code is written in a way that makes it hard to contribute:

  • All modules share the same namespace,
  • there are global variables, that are reused in several modules
  • Almost no functions are existent

To make the code easier to maintain I suggest that:

  • the code should use use warnings and use strict
    everywhere.
  • all modules should follow the perl way to create modules with package
  • most global variables are made local

As a first step I would:

  • put the '*pl' files in modules/ in a separate namespace, like JoomScan/Check
  • transform modules to packages
  • add 'use warnings' and use 'strict'
  • make the code work

I would only change the code that needs to be changed to make the code work,
to keep the extensive changes to a minimum.

after this is done, I would proceed with the rest of the code.

some example:
modules/robots.pl orig:

dprint("Checking robots.txt existing");
$response=$ua->get("$target/robots.txt");
my $headers  = $response->headers();
my $content_type =$headers->content_type();
if ($response->status_line =~ /200/g and $content_type =~ /text\/plain/g) {
	$source=$response->decoded_content;
	my @lines = split /\n/, $source;
	$probot="";
	foreach my $line( @lines ) { 
		if($line =~ /llow:/g){
			$between=substr($line, index($line, ': ')+2, 99999);
			$probot.="$target$between\n";
		}
	}
	tprint("robots.txt is found\npath : $target/robots.txt \n\nInteresting path found from 
        robots.txt\n$probot");
}else{
	 fprint("robots.txt is not found");
}

would become JoomScan/Check/RobotsTXT.pm:

package JoomScan::Check::RobotsTXT;
use warnings;
use strict;
use JoomScan::Logging qw(tprint dprint fprint)

sub check {
  my ($ua, $target) = @_;
  dprint("Checking robots.txt existing");
  my $response = $ua->get("$target/robots.txt");
  my $headers  = $response->headers();
  my $content_type =$headers->content_type();
  my $probot="";
  if ($response->status_line =~ /200/g and 
      $content_type =~ /text\/plain/g) {
	my $source = $response->decoded_content;
	my @lines = split /\n/, $source;
	foreach my $line( @lines ) { 
	  if($line =~ /llow:/g){
	    my $between=substr($line, index($line, ': ')+2, 99999);
	    $probot.="$target$between\n";
	  }
	}
	tprint("robots.txt is found\npath : $target/robots.txt \n\nInteresting path found from robots.txt\n$probot");
      }else{
	fprint("robots.txt is not found");
      }
}

1;

I think that code could still be improved, but I would leave that for the next round of refactoring

Update command

dear sir,
no update command is given. i want to update the program with new vulnerabilities.

not working

when i run in command :
joomscan-master/$ perl joomscan.pl

it doesn't work and it's back to nothing

note : i'm using windows seven

Database

dear sir,
can you explain the way by which database is update and add new entry in it.

Incorrect URL form of admin page for HTTPS site

Hi,

When checking the HTTPS URLs, admin page link has incorrect syntax between protocol and host. Instead https://host there is https:/host ( missing / ). So the link looks like this:
https:/www.example.com/administrator/

Many false positives when scanning a Joomla latest 3.9.16 Stable

I have tried few times to scan the latest Joomla default install. This seems to be not working. The version shows as 1.5 and just lists the vulnerabilities in there, but all the vuls reported are false positives. Am I missing something in the setup

[+] FireWall Detector
[++] Firewall not detected

[+] Detecting Joomla Version
[++] Joomla 1.5

[+] Core Joomla Vulnerability
[++] Joomla! 1.5 Beta 2 - 'Search' Remote Code Execution
EDB : https://www.exploit-db.com/exploits/4212/

Joomla! 1.5 Beta1/Beta2/RC1 - SQL Injection
CVE : CVE-2007-4781
EDB : https://www.exploit-db.com/exploits/4350/

Joomla! 1.5.x - (Token) Remote Admin Change Password
CVE : CVE-2008-3681
EDB : https://www.exploit-db.com/exploits/6234/

Joomla! 1.5.x - Cross-Site Scripting / Information Disclosure
CVE: CVE-2011-4909
EDB : https://www.exploit-db.com/exploits/33061/

Joomla! 1.5.x - 404 Error Page Cross-Site Scripting
EDB : https://www.exploit-db.com/exploits/33378/

Joomla! 1.5.12 - read/exec Remote files
EDB : https://www.exploit-db.com/exploits/11263/

Joomla! 1.5.12 - connect back Exploit
EDB : https://www.exploit-db.com/exploits/11262/

Joomla! Plugin 'tinybrowser' 1.5.12 - Arbitrary File Upload / Code Execution (Metasploit)
CVE : CVE-2011-4908
EDB : https://www.exploit-db.com/exploits/9926/

Joomla! 1.5 - URL Redirecting
EDB : https://www.exploit-db.com/exploits/14722/

Joomla! 1.5.x - SQL Error Information Disclosure
EDB : https://www.exploit-db.com/exploits/34955/ 

Joomla! - Spam Mail Relay
EDB : https://www.exploit-db.com/exploits/15979/

Joomla! 1.5/1.6 - JFilterInput Cross-Site Scripting Bypass
EDB : https://www.exploit-db.com/exploits/16091/

Joomla! < 1.7.0 - Multiple Cross-Site Scripting Vulnerabilities
EDB : https://www.exploit-db.com/exploits/36176/

Joomla! 1.5 < 3.4.5 - Object Injection Remote Command Execution
CVE : CVE-2015-8562
EDB : https://www.exploit-db.com/exploits/38977/

Joomla! 1.0 < 3.4.5 - Object Injection 'x-forwarded-for' Header Remote Code Execution
CVE : CVE-2015-8562 , CVE-2015-8566 
EDB : https://www.exploit-db.com/exploits/39033/

Joomla! 1.5.0 Beta - 'pcltar.php' Remote File Inclusion
CVE : CVE-2007-2199
EDB : https://www.exploit-db.com/exploits/3781/

Joomla! Component xstandard editor 1.5.8 - Local Directory Traversal
CVE : CVE-2009-0113
EDB : https://www.exploit-db.com/exploits/7691/

support for scanning page that's behind http authorization

Some ISP here block web page when infected with simple http authorization (and providing customer with login and password).

Unfortunately joomscan cannot handle such case - cannot pass http authorization.

Would be nice if it did, so please consider this feature request.

Joomscan does nothing on basic scan

So I've opened up a privileged cmd window and I have perl installed, then I navigate to the folder where I extracted joomscan. However when I run the basic command perl joomscan.pl --url www.mywebsite.com I'm just returned to the prompt, nothing happens. I've checked the "reports" folder but nothing there either.

Windows 10 Professional, 64bit

DB update

Hi !
thanks for this incredible work !

is there any way to update the database vulnerability ?
the database is now only for joomla website which is build before 2018...

Joomscan mis-reports Joomla version

Hi there,

I've just checked a brand new joomla site with Joomscan (after a lot of hardening) and had an interesting report come back.

I'm absolutely, 100% on Joomla 3.8.6. I'm on a VPS that was spun up just for this project, which started when Joomla was on 3.8.5.

Joomscan has reported back the version as 2.5.

Also, it's listed a bunch of vulnerabilities that shouldn't be relevant to this version:

https://www.dropbox.com/s/91k515an0gt9uv1/Screenshot%202018-03-15%2015.29.13.png?dl=0

It's also found an admin directory that doesn't exist: http://www.mysite.com/admin/

Given that it's misreporting these things, that's probably a good thing, insofar as an actual attacker will pursue outdated vectors. However I'm about to go through pen-testing and I'm curious to see if they'll just report back this list of vulnerabilities as if it's actually the case.

Regards,

Kelsey

Report of components scan is incorrect

When I was tested joomla sites by the joomscan, I found the incorrect report about components vulnerability.
It's 2 issues. Please fix it.

  1. Not report vulnerability even if sites has components vulnerability.
    I guess root cause is variable scope that is incorrect.
    In the components.pl, variable as comversion is use in version compare.
    So you shouldn't define at line 47 with local variable.
    (for example, define at 42(my $comversion) then use at 47($comversion = $1))

  2. Not report CVE reference.
    I guess root cause is compare the strings that is incorrect.
    In the components.pl at line 78, you should compare @matches[3] and /^-$/ because of /-/ is used as null at local vulnerability db.

Executed command
perl joomscan.pl --url <URL> --ec

Actual report

Name: *****
Location : <URL>/components/<com>/
Directory listing is enabled : <URL>/components/<com>/
Installed version : *.*
[!] We found the component "****", but since the component version was not available we
cannot ensure that it's vulnerable, please test it yourself.             <- incorrect
Title : **** 
Reference : https://www.exploit-db.com/exploits/****
Fixed in : *.*

Expected report

Name: *****
Location : <URL>/components/<com>/
Directory listing is enabled : <URL>/components/<com>/
Installed version : *.*
[!] We found the component "****".                          <- expect
Title : ****
Reference : http://www.cvedetails.com/cve/****              <- expect
Reference : https://www.exploit-db.com/exploits/****
Fixed in : *.*

joomscan.pl should be converted to Unix style line break

If we try to directly run joomscan on Linux, we get:

$ ./joomscan.pl 
zsh: ./joomscan.pl: bad interpreter: /usr/bin/perl^M: no such file or directory

If we convert it with dos2unix:

$ ./joomscan.pl
    ____  _____  _____  __  __  ___   ___    __    _  _ 
   (_  _)(  _  )(  _  )(  \/  )/ __) / __)  /__\  ( \( )
  .-_)(   )(_)(  )(_)(  )    ( \__ \( (__  /(__)\  )  ( 
  \____) (_____)(_____)(_/\/\_)(___/ \___)(__)(__)(_)\_)
			(1337.today)
   
    --=[OWASP JoomScan
    +---++---==[Version : 0.0.7
    +---++---==[Update Date : [2018/09/23]
    +---++---==[Authors : Mohammad Reza Espargham , Ali Razmjoo
    --=[Code name : Self Challenge
    @OWASP_JoomScan , @rezesp , @Ali_Razmjo0 , @OWASP


   Usage: 
    	joomscan.pl <target>
   	joomscan.pl -u http://target.com/joomla
      joomscan.pl -m targets.txt
   
   
      Options: 
   	joomscan.pl --help

Maybe other files should also be converted.

Show notification for HTTPS target when LWP protocol is missing

Hi,

Running joomscan against target with HTTPS, when https support ( LWP/Protocol/https.pm ) is not available, looks like there is Joomla detected on the target. Instead it should show some brief notification about missing https support in LWP.

Thanks

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.