Lynis

Security Auditing Tool

🛡️ Lynis क्या है?

Lynis एक powerful security auditing tool है जो UNIX-based systems (Linux, BSD, macOS) को audit करने के लिए use होता है। यह system hardening और compliance testing के लिए designed है और system की security posture को evaluate करता है।

👉 System hardening, compliance checking और security assessments में यह go-to tool माना जाता है।

🔍 Lynis क्या-क्या कर सकता है

System Hardening

Security configuration check करना

Compliance

PCI-DSS, HIPAA, ISO 27001 checks

2000+ Tests

Comprehensive security tests

Malware Detection

Hidden files और suspicious processes

Detailed Reports

Comprehensive audit reports और recommendations

⚙️ Kali NetHunter / Termux में Lynis install

aptInstallation Commands

System Update

apt update

Install Lynis

apt install lynis

Verify Installation

lynis show version

👉 Note: Lynis default Kali में available है। Git से भी install कर सकते हो latest version के लिए।

💻 Basic Commands (Use)

👉 Commands को एक-एक करके use कर सकते हो:

Basic System Audit

lynis audit system

Quick System Check

lynis quick

Show Configuration

lynis show settings

Show All Tests

lynis show tests

Show Categories

lynis show categories

Update Lynis

lynis update release

🌐 Real Example (Practical समझ)

Example🎯 System Audit Example
lynis audit system --quick

👉 यह command आपके system का quick security audit करेगी → Safe, यह locally run होती है।

📊 Output समझो

Scan complete होने पर आपको summary मिलती है:

================================================================================
[+] Lynis Scan Details:
Version : 3.1.0
Scan Date : 2024-01-15 14:30
[+] Security Hardening Index : 72 [################-]
[+] Scan results:
Files scanned : 1245
Plugins activated : 8
Tests performed : 287
[+] Suggestions found : 15
- Warning : 5
- Suggestion : 10
================================================================================

🧠 इसका मतलब:

1

Hardening Index: 72

100 में से 72 score - अच्छा है पर improvement चाहिए

2

287 Tests Performed

Comprehensive security check हुआ

3

15 Suggestions

15 areas जहाँ improvement हो सकती है

4

5 Warnings

5 critical issues जो immediate attention चाहिए

👉 Detailed report में आपको मिलता है:

  • • Category-wise test results (Firewall, Authentication, etc.)
  • • Specific security weaknesses और suggestions
  • • Links to external resources और documentation
  • • Priority-wise recommendations (high/medium/low)
  • • Custom config और plugin details

🔥 Advanced Example (Custom Categories)

lynis audit system --tests "File Integrity,Kernel,Firewall,Malware" --report-file /tmp/lynis_report.txt

👉 इस command से:

Custom Tests

Specific categories scan

Save Report

Detailed report to file

👉 Report file में complete audit findings save हो जाती हैं → future comparison और tracking के लिए

⚠️ Important Warning

Lynis सिर्फ auditing tool है - fixes automatically नहीं करता

याद रखो:

  • • Lynis सिर्फ problems बताता है, fix करना आपको खुद करना होगा
  • • Report में suggestions होती हैं - follow करो
  • • Regular audits करो - one-time नहीं
  • • Custom config और plugins explore करो

✅ Safe Tool: Lynis non-invasive है और system को damage नहीं करता। किसी भी production system पर safely run कर सकते हो।

🧩 Related Tools

Nikto

Web vulnerability scanner

OpenVAS

Network vuln scanner

Nessus

Enterprise vuln scanner

💡 Simple समझ

Lynis = "System का Medical Checkup"

यह doctor है जो आपके Linux system की full health check करता है और बताता है कि कौन-कौन सी diseases (security issues) हैं और उन्हें कैसे treat करें।