File size: 2,076 Bytes
279efce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
description: Intelligently probe system for security vulnerabilities
tags: [security, audit, vulnerabilities, hardening, project, gitignored]
---

You are helping the user identify security vulnerabilities they may wish to remediate.

## Process

1. **System update status**
   - Check for security updates: `apt list --upgradable | grep -i security`
   - Check unattended-upgrades status: `systemctl status unattended-upgrades`

2. **Open ports and services**
   - List listening ports: `sudo ss -tlnp`
   - Identify unnecessary services: `systemctl list-unit-files --state=enabled`
   - Check firewall status: `sudo ufw status verbose`

3. **SSH configuration review**
   - Check `sshd_config` for:
     - PermitRootLogin (should be 'no')
     - PasswordAuthentication (consider disabling)
     - Port (consider non-standard)
   - Check for weak keys: `ssh-keygen -l -f ~/.ssh/id_*.pub`

4. **File permissions audit**
   - Check world-writable files: `find /home -type f -perm -002 2>/dev/null | head -20`
   - Check SUID/SGID binaries: `find / -type f \( -perm -4000 -o -perm -2000 \) 2>/dev/null`
   - Review sensitive file permissions: `~/.ssh`, `~/.gnupg`

5. **User and authentication**
   - List users with shell access: `cat /etc/passwd | grep -v nologin | grep -v false`
   - Check password policy: `sudo chage -l $USER`
   - Review sudo configuration: `sudo -l`

6. **Network security**
   - Check for IPv6 if not needed
   - Review DNS settings
   - Check for proxy configurations

7. **Application security**
   - Check for outdated software with known CVEs
   - Review browser security settings
   - Check for auto-updating mechanisms

8. **Suggest security tools**
   - `lynis` - Security auditing tool
   - `rkhunter` - Rootkit scanner
   - `aide` - File integrity checker
   - `fail2ban` - Intrusion prevention

## Output

Provide a security report showing:
- Critical vulnerabilities (requiring immediate attention)
- Medium priority issues
- Low priority recommendations
- Suggested remediation steps for each issue
- Security hardening recommendations