Linux Commands for File & Network Security
๐ง Linux Commands for File & Network Security
Security professionals mainly use Linux to:
✅ Protect files
✅ Monitor users
✅ Control permissions
✅ Scan networks
✅ Detect attacks
๐ File Security Commands
๐ 1️⃣ List Files with Permissions
Shows:
Owner | Group | Others
๐ 2️⃣ Change Permissions
-
755 → executable
-
600 → private file
๐ค 3️⃣ Change Ownership
๐ 4️⃣ Find Sensitive Files
Finds SUID files (security risk).
๐ 5️⃣ Check File Integrity
Used to verify file changes.
๐️ 6️⃣ Monitor File Changes
Shows access, modify time.
๐ 7️⃣ Search Inside Files
Finds keywords in files/logs.
๐ฅ User & Access Security
๐ค 8️⃣ Check Logged-in Users
๐ 9️⃣ Check User Privileges
๐ซ ๐ Lock User Account
๐ Network Security Commands
๐ 1️⃣ Check IP & Interfaces
๐ก 2️⃣ Test Connectivity
๐ 3️⃣ Scan Network (Legal use only)
Finds open ports.
๐ 4️⃣ Check Open Ports
Shows listening services.
๐ฅ 5️⃣ Capture Packets
Used for traffic analysis.
๐ 6️⃣ Check Connections
Gets domain info.
๐ฅ 7️⃣ Firewall Control (UFW)
Controls network access.
๐ Log Monitoring (Security Core)
๐งพ Check Login Attempts
๐ Live Log Monitoring
⚙️ Process Security
⚡ Check Running Processes
❌ Kill Suspicious Process
๐ง Useful Security Combos
Find writable files:
Check failed logins:
Check history:
๐ Best Practices for Security Pros
✔ Use strong permissions
✔ Monitor logs
✔ Limit sudo access
✔ Scan open ports
✔ Enable firewall
✔ Verify file integrity
๐ Exam Short Notes
-
chmod controls permissions.
-
nmap scans ports.
-
tcpdump captures packets.
-
ufw manages firewall.
-
auth.log stores login info.
Comments
Post a Comment