How to use the command 'braa' (with examples)
- Linux
- December 25, 2023
The ‘braa’ command is an ultra-fast mass SNMP scanner that allows for scanning multiple hosts simultaneously. It can be used to walk the SNMP tree of a host, query specific OIDs, and even set values for certain OIDs. The command is highly versatile and can be used for a variety of SNMP-related tasks.
Use case 1: Walk the SNMP tree of a host with a public string querying all OIDs under .1.3.6
Code:
braa public@ip:.1.3.6.*
Motivation: Walking the SNMP tree of a host allows you to retrieve information about its entire SNMP MIB (Management Information Base). This can be useful for network management and troubleshooting purposes.
Explanation:
braa
: The command itself.public@ip
: The SNMP community string followed by the IP address or hostname of the host..1.3.6.*
: The OID (Object Identifier) to query. In this case, we are querying all OIDs under.1.3.6
, which is the root of the SNMP tree.
Example output:
.1.3.6.1.2.1.2.2.1.1.1 = 1
.1.3.6.1.2.1.2.2.1.1.2 = 2
.1.3.6.1.2.1.2.2.1.1.3 = 3
...
Use case 2: Query the whole subnet ip_range
for system.sysLocation.0
Code:
braa public@ip_range:.1.3.6.1.2.1.1.6.0
Motivation: When managing a network, it can be helpful to query multiple devices in a subnet for specific information. By querying the system.sysLocation.0
OID, you can retrieve the location information of each device in the subnet.
Explanation:
braa
: The command itself.public@ip_range
: The SNMP community string followed by the IP range of the subnet..1.3.6.1.2.1.1.6.0
: The OID to query. In this case, we are querying thesystem.sysLocation.0
OID, which represents the location information of a device.
Example output:
192.168.1.1: System Location 1
192.168.1.2: System Location 2
192.168.1.3: System Location 3
...
Use case 3: Attempt to set the value of system.sysLocation.0
to a specific workgroup
Code:
braa private@ip:.1.3.6.1.2.1.1.6.0=s'workgroup'
Motivation: Sometimes, it may be necessary to change the value of a specific OID in an SNMP device. In this case, we want to change the value of system.sysLocation.0
to a workgroup name.
Explanation:
braa
: The command itself.private@ip
: The SNMP community string followed by the IP address or hostname of the host..1.3.6.1.2.1.1.6.0=s'workgroup'
: The OID to set and the new value. In this case, we are setting the value ofsystem.sysLocation.0
to ‘workgroup’.
Example output:
Updated .1.3.6.1.2.1.1.6.0: 'workgroup'
Conclusion:
The ‘braa’ command is a powerful tool for SNMP scanning and management. It allows you to query and retrieve information from SNMP devices, set values for specific OIDs, and perform network-wide scans. With its fast and simultaneous scanning capabilities, ‘braa’ is a valuable asset for network administrators and SNMP developers.