Coder Social home page Coder Social logo

salimhaddou / snmp0wn-md5 Goto Github PK

View Code? Open in Web Editor NEW
31.0 0.0 5.0 392 KB

Bash script to bruteforce snmpv3 authentication passwords using MD5 (usmHMACMD5AuthProtocol)

License: GNU General Public License v3.0

Shell 100.00%
cracking bruteforce snmpv3

snmp0wn-md5's Introduction

snmp0wn-md5

Bash script to bruteforce snmpv3 authentication passwords using MD5 (usmHMACMD5AuthProtocol)

Great article on the vulnerability and exploit by @0x0ff (in French) : https://www.0x0ff.info/2013/snmpv3-authentification/

Pre-requisites

  • Read RFC3414 => https://tools.ietf.org/html/rfc3414

  • Download a good dictionary (one is included for demo - dico.txt).

  • Install bc - An arbitrary precision calculator language

    • On Debian: sudo apt-get install bc
  • Get a packet capture of snmpv3 traffic using Auth MD5

  • Reset the below variables to match your packet capture

    • "msgAuthoritativeEngineID"="your hex stream here"
    • "msgAuthenticationParameters"="your hex stream here"
    • "msgWhole="your hex stream here"
      • msgWhole represents your whole snmpv3 payload where you substitute msgAuthenticationParameters with 12 \x00 bytes (aka 24 zeroes).
# "msgAuthoritativeEngineID" (SNMP Agent ID)
msgAuthoritativeEngineID=""

# "msgAuthenticationParameters" (Controls authenticity and message integrity)
msgAuthenticationParameters=""

# "msgWhole" (SNMPv3 whole message where msgAuthenticationParameters value is being replaced 12 \x00 bytes
# Before: msgWhole=".....b92621f4a93d1bf9738cd5bd....."
# After: msgWhole=".....000000000000000000000000....."
msgWhole=""

You can easily copy paste your extracted hex streams from Wireshark, they do no contain escape \x nor use the 0x annotation.

How to run

./snmp0wn-md5.sh

snmp0wn-md5's People

Contributors

salimhaddou 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

snmp0wn-md5's Issues

generate zeroes in msgWhole

to replace the value of msgAuthenticationParameters in msgWhole to zeroes, instead of doing it by hand you can use the following:

msgWhole=$(echo "$msgWhole" | sed -e "s/$msgAuthenticationParameters/000000000000000000000000/")

Change md5

Hello,

You should change the md5 value in your readme.md as it refers directly to root-me challenge SMTP Authentication

Thanks for the tool though :)

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.