Giter Site home page Giter Site logo

0xbada / cve-2023-20198-cisco-ios-xe-implant-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fox-it/cisco-ios-xe-implant-detection

0.0 0.0 0.0 109 KB

Cisco IOS XE implant scanning & detection

Home Page: https://twitter.com/foxit/status/1716472673876730149

License: Apache License 2.0

Python 100.00%

cve-2023-20198-cisco-ios-xe-implant-detection's Introduction

Cisco IOS XE implant scanning

This repository contains information regarding post-exploitation activities linked to the Cisco IOS XE Software Web Management User Interface mass exploitations. Cisco Talos [1] published a fingerprint that could check if the implant was active on Cisco IOS XE devices. For reference:

curl -k -X POST "https://DEVICEIP/webui/logoutconfirm.html?logon_hash=1" 

If the HTTP response consists of a hexadecimal string, this is a high-confidence indicator that the device is compromised. However, as multiple sources have mentioned [2,3], the number of implants that can be discovered using this method has gone down significantly.

Upgraded Implant

Investigated network traffic to a compromised device has shown that the threat actor has upgraded the implant to do an extra header check. Thus, for a lot of devices, the implant is still active, but now only responds if the correct Authorization HTTP header is set.

Alternate method for Cisco IOS XE implant scanning

We took another look at the initial blogpost by Cisco Talos and noticed an extra location check in the implant code:

implant-location-percent

Based on the above screenshot of the implant code shared by Cisco Talos we found another method that can be used to fingerprint the presence of the implant.

curl -k "https://DEVICEIP/%25"

Using the %25 (percent encoded percent), we meet the conditions specified in the extra location check. This will cause the server to respond with a different HTTP response than it normally would when the implant is not running. A telltale of implant operation is a <head><title>404 Not Found</title></head> in the body. An example HTTP body is as such:

$ curl -k 'https://DEVICEIP/%25'
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

If the implant is not present, you will get a different response. For example:

$ curl -k 'https://DEVICEIP/%25'
<script>window.onload=function(){ url ='/webui';window.location.href=url;}</script>

Script to check for compromise

We created a small script that checks for compromise using the above fingerprinting method. Script can be found here:

Example usage:

$ pip3 install requests
$ python3 iocisco.py 1.1.1.1
[*] Found no sign of compromise for either http://1.1.1.1/%25 or https://1.1.1.1/%25

References

[1]: https://blog.talosintelligence.com/active-exploitation-of-cisco-ios-xe-software/
[2]: https://www.bleepingcomputer.com/news/security/number-of-hacked-cisco-ios-xe-devices-plummets-from-50k-to-hundreds/
[3]: https://twitter.com/onyphe/status/1715633541264900217

cve-2023-20198-cisco-ios-xe-implant-detection's People

Contributors

fox-srt avatar yunzheng 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.