- One terminal for pythonAPI
make PythonAPI
- Another terminal for Carla server
make launch
- It will pop up an CarlaUE4 Engine Windows, then press “Launch” and “Play”.
- autopilot 不能用 while 收data client 會crash
- 用 buffer 收一樣會經過幾次attack 後crash
- SteerRightmax {0000014A#F3A8000000F3A801] 最後一個bit應為0, 用來label 為attack msg 使用(training 記得改回來)
CAN IDS Training Result Record
- Real traffic not only ML f1-score
- method 1: save traffic log as an input file
- method 2: directly dump the traffic
model.predict(np.array(row.loc[$which row][element with feature].reshape(1,-1)
- Carla ECU ID
- Throttle → 0x1F5 → 501
- Steering → 0x14A → 330
- Brake → 0x1E7→ 487
- Gear → 0x191 → 401
- Speed → 0x309 → 777
- 要做Binary Classification or Multinomial Classification ?
- Jehoshua → Binary
- Multinomial → DoS, Spoofing, Replay
- 嘗試Spoofing 變成Binary dataset → GOOD
- Replay attack 如何Implement
- Using Models
- Decision Tree
- Logistic Regression
- XGB
- SVM
- KNN
- DNN
- CNN
- Random Forest
- 有需要做cross validation?
-
Dataset contain 5 ECU but only inject Throttle,Steering,Brake regard as attack msg.
-
Gear, Speed regard as background noise
- Throttle → 9912(label:1)
- Steering → 2400(right,label:4) & 36999(left,label:2)
- Brake → 30000(label:3)
-
Create a virtual can
sudo modprobe vcan sudo ip link add dev vcan0 type vcan sudo ip link set up vcan0
-
can-utils
- Install can-utils on Linux
$sudo apt-get install can-utils
- Dump msg on vcan0
$candump vcan0
- Dump msg on vcan0 to log file
$candump vcan0 -l
- Dump msg on vcan0 and decode it
$candump vcan0 | cantools decode "dbc file"
- Replay the log file
$canplayer -I "file.log"
- Send CA Message
$cansend can0 123#1122334455667788
- See the Bus state
$ip -details -statistics link show vcan0
-
cantools