Snort + Ssnort snmp plugin + net-snmp

Jaanus Randveer <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAHN48KEkQD7etOPPG=J3cOTYO72au53jj2q_HSLZ+4jL1ASLMQ@mail.gmail.com>
Hi!

I have issues with the net-snmp which produces me errors:

/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1902: undefined
reference to `snmp_parse_oid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1909: undefined
reference to `snmp_add_var'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1910: undefined
reference to `snmp_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1903: undefined
reference to `snmp_perror'
output-plugins/libspo.a(spo_SnmpTrap.o): In function `ParseOidAndAddToPdu':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1927: undefined
reference to `snmp_parse_oid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1934: undefined
reference to `snmp_add_var'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1935: undefined
reference to `snmp_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1928: undefined
reference to `snmp_perror'
output-plugins/libspo.a(spo_SnmpTrap.o): In function `sendInform':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1122: undefined
reference to `snmp_open'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1143: undefined
reference to `snmp_pdu_create'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1144: undefined
reference to `get_uptime'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1147: undefined
reference to `snmp_add_var'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1161: undefined
reference to `snmp_add_var'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1854: undefined
reference to `snmp_synch_response'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1884: undefined
reference to `snmp_free_pdu'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1887: undefined
reference to `snmp_close'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1163: undefined
reference to `snmp_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1125: undefined
reference to `snmp_sess_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1856: undefined
reference to `snmp_send'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:1859: undefined
reference to `snmp_sess_perror'
output-plugins/libspo.a(spo_SnmpTrap.o): In function
`snort_snmp_parse_args':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2258: undefined
reference to `snmp_sess_init'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2268: undefined
reference to `snmp_get_do_debugging'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2270: undefined
reference to `snmp_get_do_debugging'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2270: undefined
reference to `debugmsgtoken'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2270: undefined
reference to `debugmsg'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2270: undefined
reference to `debugmsgtoken'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2270: undefined
reference to `debugmsg'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2435: undefined
reference to `usmDESPrivProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2360: undefined
reference to `snmp_hex_to_binary'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2422: undefined
reference to `usmHMACSHA1AuthProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2378: undefined
reference to `snmp_hex_to_binary'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2327: undefined
reference to `snmpv3_options'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2419: undefined
reference to `usmHMACMD5AuthProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2441: undefined
reference to `usmAES128PrivProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2268: undefined
reference to `debugmsgtoken'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2268: undefined
reference to `debugmsg'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2268: undefined
reference to `debugmsgtoken'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2268: undefined
reference to `debugmsg'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2499: undefined
reference to `generate_Ku'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2528: undefined
reference to `generate_Ku'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2532: undefined
reference to `snmp_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2503: undefined
reference to `snmp_perror'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2515: undefined
reference to `get_default_privtype'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2517: undefined
reference to `snmp_duplicate_objid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2524: undefined
reference to `usmDESPrivProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2524: undefined
reference to `snmp_duplicate_objid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2486: undefined
reference to `get_default_authtype'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2488: undefined
reference to `snmp_duplicate_objid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2495: undefined
reference to `usmHMACMD5AuthProtocol'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2495: undefined
reference to `snmp_duplicate_objid'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2617: undefined
reference to `netsnmp_ds_get_string'
output-plugins/libspo.a(spo_SnmpTrap.o): In function `SnmpTrapRestartFunc':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:892: undefined
reference to `snmp_close'
output-plugins/libspo.a(spo_SnmpTrap.o): In function
`SnmpTrapCleanExitFunc':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:874: undefined
reference to `snmp_close'
output-plugins/libspo.a(spo_SnmpTrap.o): In function `InitSnmpSession':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:933: undefined
reference to `init_snmp'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:933: undefined
reference to `init_snmp'
output-plugins/libspo.a(spo_SnmpTrap.o): In function `make_hash_value':
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2213: undefined
reference to `MD5'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2219: undefined
reference to `SHA1'
/opt/snort-2.9.3.1/src/output-plugins/spo_SnmpTrap.c:2216: undefined
reference to `RIPEMD160'
collect2: error: ld returned 1 exit status
make[3]: *** [snort] Error 1
make[3]: Leaving directory `/opt/snort-2.9.3.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/snort-2.9.3.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/snort-2.9.3.1'
make: *** [all] Error 2

What im trying to do is to install Snort with the snmp trap sending
capability and for that there is snortsnmp plugin which i have to patch on
top of untar-d snort. But after patching if i try to run make it ends up
with these errors and i don't really know why it happens. Maybe someone can
point out what would cause these kind of issues.

My commands order:

RUN wget
https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
\
&& tar xvfz net-snmp-5.7.3.tar.gz \
    && cd net-snmp-5.7.3 \
    && ./configure; make; make install
........
RUN wget https://www.snort.org/downloads/archive/snort/snort-2.9.3.1.tar.gz
\
    && tar xvfz snort-2.9.3.1.tar.gz
RUN wget
https://www.cysol.co.jp/contrib/snortsnmp/SnortSnmpMod-2.9.3.1-03.tgz \
&& tar xvfz SnortSnmpMod-2.9.3.1-03.tgz \
&& zcat SnortSnmpMod-2.9.3.1-03/SnortSnmp-2.9.3.1-03.gz | patch -p 0 \
    && cd snort-2.9.3.1 \
    && ./configure; make; make install



Maybe the solution is simple but i can see it :)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.