關於SNORT無法插入範例的preprocessor - 資安

Charlotte avatar
By Charlotte
at 2007-09-27T20:22

Table of Contents


我已經解決我的問題了,總結如下:

##################################################
spp_template.c: In function `SetupTemplate':
spp_template.c:100: warning: implicit declaration of function `DebugMessage'
spp_template.c:100: error: `DEBUG_PLUGIN' undeclared (first use in this
function)
spp_template.c:100: error: (Each undeclared identifier is reported only once
spp_template.c:100: error: for each function it appears in.)
spp_template.c: In function `TemplateInit':
spp_template.c:117: error: `DEBUG_PLUGIN' undeclared (first use in this
function)
spp_template.c:131: warning: passing arg 1 of `AddFuncToPreprocList' from
incompatible pointer type
spp_template.c:131: error: too few arguments to function
`AddFuncToPreprocList'
##################################################

1. error: `DEBUG_PLUGIN' undeclared

A: #include "debug.h"
我在spp_template.c引入debug.h的函式庫


2. warning: implicit declaration of function `DebugMessage'

A: DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN,"...");
我用DEBUG_WRAP()把DebugMessage()包起來
不過我不知道為何範例的寫法會有問題


3. warning: passing arg 1 of `AddFuncToPreprocList' from incompatible pointer
type
error: too few arguments to function `AddFuncToPreprocList'

A: 新版的SNORT已經改過AddFuncToPreprocList()這個函式
SNORT2.4.1裡的型態為PreprocessFuncNode *AddFuncToPreprocList(void (*func)
(Packet *, void *))
SNORT2.6.1.5裡的型態為PreprocessFuncNode *AddFuncToPreprocList(void (*func)
(Packet *, void *), unsigned short priority, unsigned int preproc_id)
所以我目前改在SNORT2.4.1執行我的程式


4.
##################################################
etc/snort.conf(803) unknown dynamic preprocessor "template"
ERROR: Misconfigured dynamic preprocessor(s)
Fatal Error, Quitting..
##################################################

A: 我在etc/snort.conf第803行是設定"preprocessor template"
所以我在spp_template.c註冊preprocessor的名稱時也要為"template"
// RegisterPreprocessor("keyword", TemplateInit);
RegisterPreprocessor("template", TemplateInit);
如果這兩個名稱不符合就會發生這個問題,然而範例是註冊為keyword
所以一定要去修改註冊的名稱



--
Tags: 資安

All Comments

Madame avatar
By Madame
at 2007-09-27T23:27
感覺大大已經是Snort的能手了~~是否可以請問關於Snort
Hamiltion avatar
By Hamiltion
at 2007-09-29T22:10
中,偵測引擎比對Rule的程式或是演算法,哪邊可以找到??
Hedda avatar
By Hedda
at 2007-10-03T13:58
不好意思,因為作業真的就卡在這裡><
Jack avatar
By Jack
at 2007-10-07T14:34
我想請問一下 Not Using PCAP_FRAMES 在 windows 下要如
Isla avatar
By Isla
at 2007-10-11T20:18
何添加 PCAP_FRAMES=max ?!
Tom avatar
By Tom
at 2007-10-13T05:57
to kind大 http://www.bleedingsnort.com/ (Rule Set)
Caitlin avatar
By Caitlin
at 2007-10-18T01:23
謝謝NES大~~我會好好研究的~~

世界知名駭客將齊聚台北,第一屆OWASP官方亞洲會議將於台北

Catherine avatar
By Catherine
at 2007-09-16T00:55
各位同學: 很高興能告訴您,第一屆的OWASP官方亞洲會議將於9/27號在台北舉行! OWASP今年決定舉辦第一屆OWASP官方亞洲年會,地點在台北舉行,世界知名駭客與資安人士將齊聚台北,全程將為英文演說,但投影片將有中文翻譯。此次會議完全免費,由OWASP台灣分會、資策會以及中華民國資訊軟體協會共同主辦 ...

關於SNORT無法插入範例的preprocessor

Catherine avatar
By Catherine
at 2007-09-16T00:02
請教各位有使用過SNORT的先進 我在FreeBSD 6.2上安裝SNORT 2.6.1.5的版本 我參考以下這個網頁來插入範例的preprocessor,結果遇到一些問題 http://afrodita.unicauca.edu.co/~cbedon/snort/spp_kickstart.html 我的 ...

關於SSL在網站上的使用

William avatar
By William
at 2007-09-10T22:47
※ 引述《giyoshi (mm.....)》之銘言: : 請問一下版上的強者~ : 假如說一個網站有申請憑證 他要在使用者個人資料的網頁做加密(假設) : index.php(非加密) -andgt; member.php(非加密) -andgt; https://mydata.php (加密) : 截至目 ...

關於SSL在網站上的使用

Hardy avatar
By Hardy
at 2007-09-10T22:30
請問一下版上的強者~ 假如說一個網站有申請憑證 他要在使用者個人資料的網頁做加密(假設) index.php(非加密) -andgt; member.php(非加密) -andgt; https://mydata.php (加密) 截至目前為止應該沒問題 可是使用者修改完資料按鈕要回到 http://mem ...

關於WIN2000登入網域很慢的問題

Kama avatar
By Kama
at 2007-09-10T13:03
學校有一台電腦近日登入網域很慢 之前都是正常的 쀊檢查網卡及網路線都沒問題 隔壁教室也都網路順暢 唯獨此電腦開機正常 但輸入帳號密碼後 執行就很慢 大概二十分鐘還沒跑完 想請教有人知道問題在哪嗎 謝謝 -- 愛的故事有很多 你一定聽過 她們說 最美的愛情像湖泊 美的忍不住停留 而任性的風 吹 ...