[Snort-users] File extraction during http/ftp transaction

Rishabh Shah rishabh420 at ...11827...
Wed Mar 11 10:33:07 EDT 2015

Hi Joel,

Thanks for your prompt reply. I did a ./configure --enable-file-inspect and
while executing make, I saw the following error messages:

*/root/snort_src/snort- undefined reference to
*detection-plugins/libspd.a(detection_options.o): In function
undefined reference to `optionAppIdFree'*
*detection-plugins/libspd.a(detection_options.o): In function
undefined reference to `optionAppIdHash'*
*detection-plugins/libspd.a(detection_options.o): In function
undefined reference to `optionAppIdCompare'*
*collect2: error: ld returned 1 exit status*
make[3]: *** [snort] Error 1
make[3]: Leaving directory `/root/snort_src/snort-'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/snort_src/snort-'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/snort_src/snort-'
make: *** [all] Error 2

I am not sure why am I seeing those messages as I see a reference to the
above errors:

root at ...17114...:~/snort_src/snort- grep -r
"optionAppIdFree" .
Binary file ./detection-plugins/detection_options.o matches
Binary file ./detection-plugins/sp_appid.o matches
./detection-plugins/sp_appid.c:void optionAppIdFree(AppIdOptionData
./detection-plugins/sp_appid.c:        optionAppIdFree(optData);
Binary file ./detection-plugins/libspd.a matches
./detection-plugins/sp_appid.h:void optionAppIdFree(AppIdOptionData

I appended the following line in snort.conf:
*preprocessor file_inspect: type_id, signature, capture_disk
/home/file_capture/tmp/, capture_queue_size 5000*

While executing snort process, I got a core file with the following message:

File config:
    file type: ENABLED
    file signature: ENABLED
    file capture: ENABLED
    file capture directory: /home/file_capture/tmp/
    file capture disk size: 300 (Default) megabytes
    file sent to host: DISABLED (Default), port number: 0

*Segmentation fault (core dumped)*

The traceback of the core file points to:

root at ...17114...:~/snort_src# gdb snort -c core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from snort...done.

warning: exec file is newer than core file.
[New LWP 10904]

warning: .dynamic section for
"/usr/local/lib/snort_dynamicengine/libsf_engine.so" is not at the expected
address (wrong library or version mismatch?)

warning: .dynamic section for
"/usr/local/lib/snort_dynamicpreprocessor//libsf_reputation_preproc.so" is
not at the expected address (wrong library or version mismatch?)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/bin/snort -c /etc/snort/snort.conf -Q -i
eth1:eth2 -l /var/log/snort'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
106     ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
*#0  strlen () at ../sysdeps/x86_64/strlen.S:106*
*#1  0x00007f6ab63050a6 in appIdStatsInit (appFileName=0x7f6ab6628170
<config+16> "appstats-unified.log", statsPeriod=10, rolloverSize=20971520,
rolloverPeriod=86400) at appIdStats.c:264*
*#2  0x00007f6ab62fa2d0 in AppIdCommonInit (memcap=268435456) at
*#3  0x00007f6ab6303798 in AppIdInit (sc=0x1eb9770, args=0x1f516e0
"app_stats_filename appstats-unified.log, app_stats_period 10,
app_detector_dir /usr/local/lib/openappid") at spp_appid.c:157*
*#4  0x000000000042048e in InitVarTables (p=0x1eb9770) at parser.c:5728*
*#5  0x000000000046c3d0 in CheckAppId (option_data=0x0, p=0x0) at
*#6  0x0000000000000000 in ?? ()*
*(gdb) Quit*

I had installed openappid as well.

On Wed, Mar 11, 2015 at 7:00 PM, Joel Esler (jesler) <jesler at ...589...>

>  On Mar 11, 2015, at 9:23 AM, Rishabh Shah <rishabh420 at ...11827...> wrote:
>  Hi Snort Team,
>  Is it possible to extract any file during http/ftp transactions? The
> HTTP preprocessor makes it possible to read the HTTP URI/content. Does
> snort have the intelligence to extract the file during any transfer?
>  Beginning with, Snort has had the ability to extract files from
> streams and write them to disk.
>  Check out the README: https://www.snort.org/faq/readme-file
>  --
> *Joel Esler*
> Open Source Manager
> Threat Intelligence Team Lead
> Talos Group

Rishabh Shah.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20150311/b8767fcc/attachment.html>

More information about the Snort-users mailing list