Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Linux

วิธีติดตั้งและใช้ Microsoft Defender ใน Linux

แม้หลาย Linux users นอก enterprise อาจไม่เข้าใจจุดของ Microsoft tools บน Linux แต่ผู้ที่อยู่ในภายในจะเข้าใจว่าพวกมัน invaluable ความสามารถในการ integrate กับ Active Directory และส่วนใหญ่ของ Microsoft ecosystem ที่ครอบครอง workplace เป็น huge สำหรับ desktop Linux และทำให้ favorite distro ของคุณ viable OS ใน workplace มากขึ้น หนึ่งในส่วนสำคัญที่สุดของ enterprise คือ security บทช่วยสอนนี้แสดงวิธีติดตั้งและใช้ Microsoft Defender บน Linux เพื่อให้ IT department สามารถ scan เครื่องของคุณหา threats

วิธีติดตั้ง Microsoft Defender ใน Linux

เพื่อติดตั้ง Microsoft defender บน Linux instructions แตกต่างจาก distro ไป distro Microsoft ไม่ได้ put packages ใน repository จึงต้อง ensure right dependencies installed และ add repos

RPM-Based Distros

ต้องการ yum-utils หรือ dnf-utils:

sudo dnf instll yum-utils

เพื่อ configure Microsoft repos basic syntax ของ Microsoft repos คือ:

https://packages.microsoft.com/config/[distro]/[version]/[channel].repo

สำรวจ mirror นี้เพื่อดูว่าอยากได้อะไร ผมจะใช้ prod.repo for the sake of consistency เพราะ all distros have prod.repo หรือ prod.list available ดังนั้นสำหรับ Fedora system ของผม คำสั่งจะเป็น:

sudo yum-config-manager --add-repo=https://packages.microsoft.com/config/fedora/33/prod.repo

สำหรับ CentOS system ที่ผมใช้ model คำสั่งจะเป็น:

sudo yum-config-manager --add-repo=https://packages.microsoft.com/config/centos/8/prod.repo

ใช้คำสั่ง yum เพราะ targeted at RHEL, CentOS, และ Oracle Linux แต่ใช้ dnf ก็ได้ ต้อง import Microsoft's GPG key ด้วยคำสั่ง:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

Run quick update:

sudo yum update

หลังจากนั้นควรสามารถ install package ได้ ชื่อคือ mdatp หรือ Microsoft Defender Advanced Threat Protection

sudo yum install mdatp

Debian/Ubuntu Systems

ต้องการ additional dependencies สองตัว:

sudo apt install curl libplist-utils

จากนั้น follow basically the same process:

curl -o microsoft.list https://packages.microsoft.com/config/ubuntu/20.04/prod.list
sudo mv ./microsoft.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt install gpg
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt install apt-transport-https
sudo apt update
sudo apt install mdatp

Install repo, GPG key, any dependencies, และ mdatp

การใช้ Microsoft Defender บน Linux

การรัน Scans (Running Scans)

หนึ่งในสิ่งหลักที่อยากทำคือ scan system หา threats เปิด terminal พิมพ์คำสั่ง:

mdatp scan full

จะ scan จำนวนไฟล์มากที่สุดที่มี access (ในกรณีผม 329,812) และ report threats ที่รู้จัก สามารถรัน quick หรือ custom scans ได้ custom option ให้ specify a directory หรือ a file หรือ ignore any exclusions ที่ตั้งไว้ก่อนหน้า สามารถรัน scan แบบนี้:

mdatp scan custom --path /PATH/TO/DIRECTORY --ignore-exclusions

หากตั้ง exclusion อย่างด้านล่าง รัน above scan ได้

การอัปเดต Signatures (Updating Signatures)

เพื่อ update virus signatures on Microsoft Defender on Linux update มันเหมือน package อื่นๆ

sudo yum update mdatp
sudo apt-get upgrade mdatp

การตั้งค่า Exclusions (Setting Exclusions)

สร้าง exclusions ให้ files ที่รู้จักว่า good ไม่ถูก report ทำได้หลายวิธี เพื่อ exclude a file type ใช้คำสั่งอย่าง:

mdatp exclusion extension add --name .png

จะเอา .png files ทั้งหมดไป exclusion list ไม่แนะนำแน่นอน แต่หากมี particular file type ที่สร้างและรู้ว่าไม่ต้อง scan ใช้คำสั่งนั้นได้

สร้าง exclusion สำหรับ directory ใช้คำสั่งคล้ายกัน:

mdatp exclusion folder add --path /PATH/TO/DIRECTORY/

ตอนนี้ directory ที่บอก mdatp exclude จะไม่ถูก scan helpful หากมี security testing tools บนระบบ เพราะมี virus signatures ที่สามารถ trip up antivirus software

หวังว่าคุณเพลิดเพลินกับคู่มือติดตั้งและใช้ Microsoft Defender บน Linux หากไม่ keen on using Microsoft Defender บน Linux ดู antivirus software อื่นๆ สำหรับ Linux หรือเรียนรู้วิธี scan for rootkits และ viruses ใน Linux