SNMP 服務枚舉

SNMP 服務枚舉

用處不大,現(xiàn)在服務器上都會配置只允許哪些IP訪問本機的SNMP服務

snmpcheck 命令使用:

沒試出來怎么用

snmpwalk 命令使用:

# 查找 FTP
snmpwalk -c public 192.168.1.99 -v 1 |grep ftp
# 查找 開放的TCP端口
snmpwalk -c public 192.168.1.99 -v 1 |grep tcpConnState|cut -d "." -f6 |sort -nu
# 掃描交換機
snmpwalk -c public 192.168.1.2 -v 2c >snmp.log

snmp.log 內(nèi)容:

so.3.6.1.2.1.1.1.0 = STRING: "H3C Switch S5024PV2-EI Software Version 5.20.99, Release 1106^M
Copyright(c)2004-2015 Hangzhou H3C Tech. Co., Ltd. All rights reserved."
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.25506.1.927
iso.3.6.1.2.1.1.3.0 = Timeticks: (1364244768) 157 days, 21:34:07.68
iso.3.6.1.2.1.1.4.0 = STRING: "Hangzhou H3C Technologies Co., Ltd."
iso.3.6.1.2.1.1.5.0 = STRING: "H3C"
iso.3.6.1.2.1.1.6.0 = STRING: "Hangzhou, China"
.....
iso.3.6.1.2.1.3.1.1.1.30.1.192.168.1.1 = INTEGER: 30
iso.3.6.1.2.1.3.1.1.1.30.1.192.168.1.4 = INTEGER: 30
...

命令幫助:

OPTIONS:
  -h, --help        display this help message
  -H            display configuration file directives understood
  -v 1|2c|3     specifies SNMP version to use
  -V, --version     display package version number
SNMP Version 1 or 2c specific
  -c COMMUNITY      set the community string
SNMP Version 3 specific
  -a PROTOCOL       set authentication protocol (MD5|SHA)
  -A PASSPHRASE     set authentication protocol pass phrase
  -e ENGINE-ID      set security engine ID (e.g. 800000020109840301)
  -E ENGINE-ID      set context engine ID (e.g. 800000020109840301)
  -l LEVEL      set security level (noAuthNoPriv|authNoPriv|authPriv)
  -n CONTEXT        set context name (e.g. bridge1)
  -u USER-NAME      set security name (e.g. bert)
  -x PROTOCOL       set privacy protocol (DES|AES)
  -X PASSPHRASE     set privacy protocol pass phrase
  -Z BOOTS,TIME     set destination engine boots/time
General communication options
  -r RETRIES        set the number of retries
  -t TIMEOUT        set the request timeout (in seconds)
Debugging
  -d            dump input/output packets in hexadecimal
  -D[TOKEN[,...]]   turn on debugging output for the specified TOKENs
               (ALL gives extremely verbose debugging output)
General options
  -m MIB[:...]      load given list of MIBs (ALL loads everything)
  -M DIR[:...]      look in given list of directories for MIBs
    (default: $HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/
mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp)  -P MIBOPTS     Toggle various defaults controlling MIB parsing:
              u:  allow the use of underlines in MIB symbols
              c:  disallow the use of "--" to terminate comments
              d:  save the DESCRIPTIONs of the MIB objects
              e:  disable errors when MIB symbols conflict
              w:  enable warnings when MIB symbols conflict
              W:  enable detailed warnings when MIB symbols conflict
              R:  replace MIB symbols from latest module
  -O OUTOPTS        Toggle various defaults controlling output display:
              0:  print leading 0 for single-digit hex characters
              a:  print all strings in ascii format
              b:  do not break OID indexes down
              e:  print enums numerically
              E:  escape quotes in string indices
              f:  print full OIDs on output
              n:  print OIDs numerically
              q:  quick print for easier parsing
              Q:  quick print with equal-signs
              s:  print only last symbolic element of OID
              S:  print MIB module-id plus last element
              t:  print timeticks unparsed as numeric integers
              T:  print human-readable text along with hex strings
              u:  print OIDs using UCD-style prefix suppression
              U:  don't print units
              v:  print values only (not OID = value)
              x:  print all strings in hex format
              X:  extended index format
  -I INOPTS     Toggle various defaults controlling input parsing:
              b:  do best/regex matching to find a MIB node
              h:  don't apply DISPLAY-HINTs
              r:  do not check values for range/type legality
              R:  do random access to OID labels
              u:  top-level OIDs must have '.' prefix (UCD-style)
              s SUFFIX:  Append all textual OIDs with SUFFIX before parsing
              S PREFIX:  Prepend all textual OIDs with PREFIX before parsing
  -L LOGOPTS        Toggle various defaults controlling logging:
              e:           log to standard error
              o:           log to standard output
              n:           don't log at all
              f file:      log to the specified file
              s facility:  log to syslog (via the specified facility)

              (variants)
              [EON] pri:   log to standard error, output or /dev/null for level 'pri' and above
              [EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
              [FS] pri token:    log to file/syslog for level 'pri' and above
              [FS] p1-p2 token:  log to file/syslog for levels 'p1' to 'p2'
  -C APPOPTS        Set various application specific behaviours:
              p:  print the number of variables found
              i:  include given OID in the search range
              I:  don't include the given OID, even if no results are returned
              c:  do not check returned OIDs are increasing
              t:  Display wall-clock time to complete the walk
              T:  Display wall-clock time to complete each request
              E {OID}:  End the walk at the specified OID
最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末币狠,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌宛渐,老刑警劉巖狠轻,帶你破解...
    沈念sama閱讀 216,843評論 6 502
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件荞驴,死亡現(xiàn)場離奇詭異遭庶,居然都是意外死亡磕蒲,警方通過查閱死者的電腦和手機充尉,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,538評論 3 392
  • 文/潘曉璐 我一進店門飘言,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人驼侠,你說我怎么就攤上這事姿鸿∽晃猓” “怎么了?”我有些...
    開封第一講書人閱讀 163,187評論 0 353
  • 文/不壞的土叔 我叫張陵苛预,是天一觀的道長句狼。 經(jīng)常有香客問我,道長热某,這世上最難降的妖魔是什么鲜锚? 我笑而不...
    開封第一講書人閱讀 58,264評論 1 292
  • 正文 為了忘掉前任,我火速辦了婚禮苫拍,結果婚禮上芜繁,老公的妹妹穿的比我還像新娘。我一直安慰自己绒极,他們只是感情好骏令,可當我...
    茶點故事閱讀 67,289評論 6 390
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著垄提,像睡著了一般榔袋。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上铡俐,一...
    開封第一講書人閱讀 51,231評論 1 299
  • 那天凰兑,我揣著相機與錄音,去河邊找鬼审丘。 笑死吏够,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的滩报。 我是一名探鬼主播锅知,決...
    沈念sama閱讀 40,116評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼脓钾!你這毒婦竟也來了售睹?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 38,945評論 0 275
  • 序言:老撾萬榮一對情侶失蹤可训,失蹤者是張志新(化名)和其女友劉穎昌妹,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體握截,經(jīng)...
    沈念sama閱讀 45,367評論 1 313
  • 正文 獨居荒郊野嶺守林人離奇死亡飞崖,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,581評論 2 333
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了川蒙。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片蚜厉。...
    茶點故事閱讀 39,754評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡长已,死狀恐怖畜眨,靈堂內(nèi)的尸體忽然破棺而出昼牛,到底是詐尸還是另有隱情,我是刑警寧澤康聂,帶...
    沈念sama閱讀 35,458評論 5 344
  • 正文 年R本政府宣布贰健,位于F島的核電站,受9級特大地震影響恬汁,放射性物質(zhì)發(fā)生泄漏伶椿。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,068評論 3 327
  • 文/蒙蒙 一氓侧、第九天 我趴在偏房一處隱蔽的房頂上張望脊另。 院中可真熱鬧,春花似錦约巷、人聲如沸偎痛。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,692評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽踩麦。三九已至,卻和暖如春氓癌,著一層夾襖步出監(jiān)牢的瞬間谓谦,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,842評論 1 269
  • 我被黑心中介騙來泰國打工贪婉, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留反粥,地道東北人。 一個月前我還...
    沈念sama閱讀 47,797評論 2 369
  • 正文 我出身青樓疲迂,卻偏偏與公主長得像星压,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子鬼譬,可洞房花燭夜當晚...
    茶點故事閱讀 44,654評論 2 354

推薦閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構建分布式系統(tǒng)中一些常見模式的工具(例如配置管理娜膘,服務發(fā)現(xiàn),斷路器优质,智...
    卡卡羅2017閱讀 134,652評論 18 139
  • 名詞延伸 通俗的說,域名就相當于一個家庭的門牌號碼避乏,別人通過這個號碼可以很容易的找到你爷耀。如果把IP地址比作一間房子...
    楊大蝦閱讀 20,601評論 2 57
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 46,806評論 6 342
  • win7 cmd管理員權限設置 net localgroup administrators 用戶名 /add 把“...
    f675b1a02698閱讀 5,187評論 0 11
  • 你從未想過 突然在某一天 因為某個瞬間你會喜歡上一個人 也許在對的時間 喜歡上了不該喜歡的人德谅。于是 你只能盡力說服...
    瘋薇子閱讀 99評論 0 0