# USB Keystrokes {{#include ../../../banners/hacktricks-training.md}} 如果你有一个包含键盘通过USB通信的pcap,如下所示: ![](<../../../images/image (962).png>) 你可以使用工具 [**ctf-usb-keyboard-parser**](https://github.com/TeamRocketIst/ctf-usb-keyboard-parser) 来获取通信中写入的内容: ```bash tshark -r ./usb.pcap -Y 'usb.capdata && usb.data_len == 8' -T fields -e usb.capdata | sed 's/../:&/g2' > keystrokes.txt python3 usbkeyboard.py ./keystrokes.txt ``` 您可以阅读更多信息并找到一些关于如何分析此内容的脚本: - [https://medium.com/@ali.bawazeeer/kaizen-ctf-2018-reverse-engineer-usb-keystrok-from-pcap-file-2412351679f4](https://medium.com/@ali.bawazeeer/kaizen-ctf-2018-reverse-engineer-usb-keystrok-from-pcap-file-2412351679f4) - [https://github.com/tanc7/HacktheBox_Deadly_Arthropod_Writeup](https://github.com/tanc7/HacktheBox_Deadly_Arthropod_Writeup) {{#include ../../../banners/hacktricks-training.md}}