Skip to content

Instantly share code, notes, and snippets.

@taeyeonssupdate
Last active August 22, 2025 06:44
Show Gist options
  • Select an option

  • Save taeyeonssupdate/886f6a4892bbba8d33d5c321b771d8a5 to your computer and use it in GitHub Desktop.

Select an option

Save taeyeonssupdate/886f6a4892bbba8d33d5c321b771d8a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# fileless_eicar.sh
# EICAR 測試字串
EICAR='X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
# 用 /dev/shm 建立記憶體檔案 (tmpfs)
MEMFILE=$(mktemp -u /dev/shm/eicar.XXXX)
echo -n "$EICAR" > "$MEMFILE"
# 嘗試讀取並執行(對 Fileless 偵測有效)
cat "$MEMFILE"
# 清理
rm -f "$MEMFILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment