Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

當協定為ICMP時有奇怪的紀錄會破壞整個邏輯 #4

Open
hms5232 opened this issue Oct 25, 2019 · 2 comments
Open

當協定為ICMP時有奇怪的紀錄會破壞整個邏輯 #4

hms5232 opened this issue Oct 25, 2019 · 2 comments

Comments

@hms5232
Copy link
Owner

hms5232 commented Oct 25, 2019

例如下方這筆紀錄(部份資料以XX代替):

Oct 21 10:18:12 Isla kernel: [8528523.688986] [UFW BLOCK] IN=eno1 OUT= MAC=XX SRC=XX DST=XX LEN=143 TOS=0x00 PREC=0xC0 TTL=42 ID=40416 PROTO=ICMP TYPE=3 CODE=1 [SRC=X DST=X LEN=115 TOS=0x00 PREC=0x00 TTL=44 ID=34084 DF PROTO=TCP SPT=443 DPT=59261 WINDOW=247 RES=0x00 ACK PSH FIN URGP=0 ]

有時不會有後面,雖然資料處理沒問題但欄位會歪掉,例如下方這筆:

Oct 21 03:37:12 Isla kernel: [8504464.142831] [UFW BLOCK] IN=eno1 OUT= MAC=XX SRC=XX DST=XX LEN=40 TOS=0x00 PREC=0x00 TTL=13 ID=12881 PROTO=ICMP TYPE=13 CODE=0

以上情況皆只有在協定為 ICMP 時才會發生

@hms5232
Copy link
Owner Author

hms5232 commented Dec 30, 2019

此問題後半部份已經在 831e29a 修復!

但前半部份問題仍存在,以下是新的範例檔案

Dec 25 09:18:16 1051103 kernel: [1726047.186192] [UFW AUDIT] IN= OUT=ens160 SRC=XXX.XXX.17.XXX DST=189.XXX.XXX.189 LEN=132 TOS=0x00 PREC=0xC0 TTL=64 ID=64025 PROTO=ICMP TYPE=3 CODE=3 [SRC=189.112.109.189 DST=XXX.XXX.17.XXX LEN=104 TOS=0x00 PREC=0x00 TTL=41 ID=17864 DF PROTO=TCP SPT=57485 DPT=22 WINDOW=268 RES=0x00 ACK PSH URGP=0 ]

此筆紀錄拆分成前(一般情況)、後(包在[ ]的部份)的話:

  1. 前和後的 SRC、DST 所紀錄的 IP 位置交換

此問題待解決

@hms5232
Copy link
Owner Author

hms5232 commented Jan 18, 2020

發現變種中還有不同的orz

Jan 13 11:07:59 me kernel: [3374209.336228] [UFW AUDIT INVALID] IN=ens160 OUT= MAC=00:50:56:b5:c5:5a:80:7f:f8:46:60:48:08:00 SRC=xx.xx.xx.xx DST=xxx.xx.xx.xxx LEN=80 TOS=0x02 PREC=0x40 TTL=238 ID=0 PROTO=ICMP TYPE=3 CODE=4 [SRC=xxx.xxx.xxx.xxxDST=xxx.xxx.xxx.xxx LEN=22112 TOS=0x02 PREC=0x40 TTL=174 ID=60768 MF FRAG:7019 PROTO=76 ] MTU=1460 

MTU 的部分已經在 5e59052 修復
但這個中括號裡面的資訊看來要再花一番功夫處理了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant