Disqus Shortname

Monday, 10 April 2017

Hacking SNMP Service Part 2 - The Post Exploitation : Attacking Network - Network Pentesting

Hacking SNMP Service Part 2 - The Post Exploitation : Attacking Network - Network Pentesting

From our previous post, We have identified the community strings Via Nmap Scan & Brute Forcing the Community String Values.

Now we will see, How can we use those Extracted Community strings for Post Exploitation.

To perform We will use various tools as mention below.

What Is MIB in SNMP

The SNMP Management Information Base (MIB) is a database containing information
usually related to network management. The database is organized like a tree, where
branches represent different organizations or network functions. The leaves of the tree
(final endpoints) correspond to specific variable values that can then be accessed, and
probed, by an external user. To read more about the MIB tree, refer to the following

For example, the following MIB values correspond to specific Microsoft Windows
SNMP parameters.        System Processes     Running Programs     Processes Path     Storage Units     Software Name      User Accounts        TCP LocalPorts

We already got our community strings as "mike", Now we are passing this to SNMPWALK tools followed by out target IP. which will extract the information all possible information from SNMP service.

snmpwalk -v1 -c mike

The output is very massive, So i am redirecting the output to a text file.

snmpwalk -v1 -c mike > snmpout.txt

As you can see below, we have tons of output. With some Many MIB Values.

To do some specific search, we can use MIB values in snmpwalk .

snmpwalk  -c <Communitystring> –v1 <MIBValues>

In our case community string is - mike

Extracting Windows Users:

snmpwalk  -c mike  -v1

Extracting Running Windows Processes:

snmpwalk ­‐c mike  ‐v1

Extracting Open TCP Ports:

snmpwalk ‐c mike  ‐v1

Extracting Installed Software:

snmpwalk ‐c mike  ­‐v1

Now we need to Verify whether this community strings "milke" is Writable or not.To do this we will use a another tool SNMPSET

snmpset -v1 -c mike iso. s SomeOneWasHere

Here the value "iso." which have value "bhati" is picked from out snmpwalk output file.

This snmpset -v1 -c mike iso. s SomeOneWasHere command will go ahead and change the value from "bhati" to "SomeOneWasHere" in SNMP. Lets try this.

Our command succeed.

Now lets Re-Scan our SNMP Target using SNMPWALK

As you can see below, The value has been changed to "SomeOneWasHere".

Now we are confirm that, Our Community String "mike" is Have Write Properties.Now we should move to Next Part of Dumping Some Meal from target machine.


snmpcheck tools will uncovered the Important Information of target machine using the community strings "mike" which we have found.

snmpcheck.rb -c mike

If you got error while running this command, please see help section of snmpcheck followed by -h, Your version might be older or newer.

C) Metasploit

We can achieve the same information using metasploit auxiliaries.


Fill the required value.

Now just hit "run" and you will see tons of Meal from our target machine.

No comments:

Post a Comment

Featured post

Pentesting Node.js Application : Nodejs Application Security

Pentesting Node.js Application : Nodejs Application Security Hello folks, Today we will see how we can do Pentesting Of NodeJS Appli...

Popular Posts