ไฟล์ประเภทไหนถูกบล็อกเป็น Attachment ในอีเมล (Email Attachment Blocking)
องค์กรส่วนใหญ่บล็อก **Executable Files และไฟล์ที่รันโค้ดได้** เพื่อป้องกัน Malware Delivery — นโยบายมาตรฐาน (Default Policy) ของ **Microsoft 365 (Exchange Online Protection), Google Workspace, Proofpoint, Mimecast, Cisco ESA** คล้ายกัน
รายการ副檔名 (Extensions) ที่มักถูกบล็อก (Common Blocked Extensions)
🚫 High Risk — Executable / Runnable Code (บล็อกทุกกรณีเกือบทุกองค์กร)
.exe .com .scr .bat .cmd .vbs .vbe .js .jse .ws .wsf .wsh .ps1 .ps1xml .ps2 .ps2xml .psc1 .psc2 .msh .msh1 .msh2 .mshxml .msh1xml .msh2xml .jar .py .pyc .pyo .pyw .pyz .rb .pl .php .sh .bash .csh .app .ipa .apk .xap .xpi .gadget .msi .msp .mst .inf .reg .cpl
⚠️ Medium Risk — Script / Macro / Installer (บล็อกหรือ Quarantine/Scan แบบเข้มงวด)
.vb .vba .docm .xlsm .pptm .dotm .xltm .potm .ppam .ppsm .sldm .hta .htm .html .mht .mhtml .url .lnk .scf .shb .shs .xbap .dll .ocx .sys .drv .cpl .ax .acm .tsp .ime .rs .tmp
📦 Archive / Container (มักสแกนซ้ำ Recursive — ถ้ามีไฟล์อันตรายภายใน จะบล็อก)
.zip .rar .7z .tar .gz .bz2 .xz .cab .iso .img .vhd .vhdx .tgz .tbz2 .txz .z .tar.gz .tar.bz2 .tar.xz
⚠️ **Password-protected Archives:** ไม่สามารถสแกนได้ → มัก **Block / Quarantine / Strip** ตาม Policy
📄 Document Formats (Office / PDF) — ปกติ Allow แต่สแกน Macro/Exploit
.doc .docx .xls .xlsx .ppt .pptx .pdf .rtf .odt .ods .odp
- Office Macro (.docm, .xlsm, .pptm) → **Block หรือ Open in Protected View / Disable Macros**
- PDF → Scan Embedded JavaScript, Launch Actions, Embedded Files
✅ Low Risk — Typically Allowed (แต่ยังสแกน Malware/Content)
.txt .csv .log .xml .json .yaml .yml .md .png .jpg .jpeg .gif .bmp .tiff .webp .svg .mp3 .wav .flac .mp4 .mov .avi .mkv
ทำไมบล็อกไฟล์เหล่านี้? (Rationale)
| Category | Risk | Example Attack |
|---|---|---|
| Executables (.exe, .scr, .bat, .ps1) | Direct Code Execution | Ransomware, Trojan, RAT, InfoStealer |
| Scripts (.js, .vbs, .py, .sh) | Interpreter Execution | Living off the Land (LOLBins), Fileless Malware |
| Office Macros (.docm, .xlsm) | VBA Macro Execution | Emotet, TrickBot, Qakbot, Maldoc |
| Shortcuts (.lnk, .url, .scf) | Auto-execute / NTLM Hash Theft | LNK Exploit (CVE-2017-8464), SCF Hash Theft |
| Archives (.zip, .rar) | Bypass Filtering (Nested) | Malware in Password-protected Zip |
| ISO/IMG/VHD | Mount as Drive → Auto-run | ISO Mount Malware Delivery (Qakbot, IcedID) |
Microsoft 365 / Exchange Online Protection (EOP) Default Block List
Microsoft บล็อก **~100+ Extensions** โดย Default (ไม่สามารถปิดได้สำหรับ High-risk) — ดูรายการเต็ม: Get-ContentFilterConfig | Select -Expand FileTypes ใน Exchange Online PowerShell
- High Risk: .ade, .adp, .app, .asp, .bas, .bat, .cer, .chm, .cmd, .com, .cpl, .crt, .csh, .exe, .fxp, .hlp, .hta, .inf, .ins, .isp, .its, .js, .jse, .ksh, .lnk, .mad, .maf, .mag, .mam, .maq, .mar, .mas, .mat, .mau, .mav, .maw, .mda, .mdb, .mde, .mdt, .mdw, .mdz, .msc, .msh, .msi, .msp, .mst, .ops, .pcd, .pif, .prf, .prg, .pst, .reg, .scf, .scr, .sct, .shb, .shs, .tmp, .url, .vb, .vbe, .vbs, .vsmacros, .vss, .vst, .vsw, .ws, .wsc, .wsf, .wsh
- Level 2 (Quarantine): .zip, .rar, .7z, .cab, .iso, .docm, .xlsm, .pptm, .pdf (with JS), .lnk
Google Workspace (Gmail) Attachment Restrictions
- บล็อก: .exe, .bat, .com, .cmd, .scr, .pif, .vbs, .js, .jar, .msi, .msp, .mst, .cpl, .hta, .inf, .ins, .isp, .lnk, .scf, .shb, .shs, .url, .vbe, .wsf, .wsh, .ps1, .ps2, .psc1, .psc2, .msh, .msh1, .msh2, .mshxml, .msh1xml, .msh2xml
- บล็อก **Encrypted Archives** (Password-protected) ที่สแกนไม่ได้
- จำกัดขนาด: **25 MB** ต่ออีเมล (รวม Attachments)
วิธีส่งไฟล์ที่ถูกบล็อก (Legitimate Business Need)
- File Sharing Links: OneDrive, SharePoint, Google Drive, Dropbox, WeTransfer, Firefox Send (Deprecated) — **Best Practice**
- Rename Extension: `.exe` → `.exe_` → บอกผู้รับ rename กลับ (ไม่แนะนำ — บ่งชี้ Security Awareness ต่ำ)
- Password-protected Archive + Separate Channel ส่ง Password: Zip + AES-256 Password → ส่งไฟล์ทางอีเมล, ส่ง Password ทาง SMS/Teams/Phone
- Admin Override: ขอ IT/Admin เพิ่ม Exception ใน Policy (ต้องมี Business Justification + Risk Acceptance)
Best Practices สำหรับ Email Attachment Security
- ✅ **Default Deny Executables** — บล็อกทุก Executable Extension
- ✅ **Scan Archives Recursively** (Max Depth 3-5, Max Size 50-100MB)
- ✅ **Block Password-protected Archives** (หรือ Quarantine สำหรับ Manual Review)
- ✅ **Disable Macros by Default** — ใช้ Protected View, Trusted Locations
- ✅ **ATP / Safe Attachments (Defender for Office 365) / Advanced Threat Protection** — Detonate ใน Sandbox
- ✅ **User Education:** "อย่าเปิดไฟล์แนบจากคนไม่รู้จัก, ไฟล์ .exe/.zip ที่ไม่คาดหวัง"
- ✅ **DLP Rules:** ป้องกันข้อมูล nhạy cảm (PII, PCI, PHI, IP) ออกนอกองค์กรผ่าน Attachment
สรุป
**Network/Email Security บล็อกไฟล์ที่ "รันโค้ดได้" (Executable, Script, Macro, Installer, Shortcut) และ Archive ที่ซ่อนไฟล์อันตราย** — ไฟล์ Data Only (.txt, .pdf, .jpg, .csv) ปลอดภัยกว่า แต่ยังสแกน Exploit/Malware — **Best Practice: ใช้ File Sharing Link แทน Attachment สำหรับไฟล์ใหญ่/Executable/Legitimate Business Need**