This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ccdc_checklist [2021/11/06 01:50] – Charlie Root | ccdc_checklist [2022/01/30 20:09] (current) – Charlie Root | ||
---|---|---|---|
Line 3: | Line 3: | ||
This is a sample checklist for [[DCDC|CCDC]]-style competitions. | This is a sample checklist for [[DCDC|CCDC]]-style competitions. | ||
- | ==== Password Changes | + | ==== Linux ==== |
+ | |||
+ | === Password Changes === | ||
Change all shell user passwords: | Change all shell user passwords: | ||
Line 10: | Line 12: | ||
</ | </ | ||
- | |||
- | ==== Services ==== | ||
Change all shell users' Samba passwords: | Change all shell users' Samba passwords: | ||
Line 17: | Line 17: | ||
read; for u in $(cat /etc/passwd | grep -E "/ | read; for u in $(cat /etc/passwd | grep -E "/ | ||
</ | </ | ||
+ | |||
+ | |||
+ | === Firewall === | ||
+ | |||
+ | Enable the firewall: | ||
+ | < | ||
+ | ufw enable | ||
+ | </ | ||
+ | |||
+ | Check the permitted ports and remove unnecessary whitelists: | ||
+ | < | ||
+ | ufw status numbered | ||
+ | |||
+ | ufw delete [number] | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Service Hardening === | ||
+ | |||
+ | == PHP == | ||
+ | |||
+ | Searching for web shells: | ||
+ | < | ||
+ | Find your webroot (Typically / | ||
+ | </ | ||
+ | |||
+ | Disable functions that allow hackers to execute code on your system: | ||
+ | < | ||
+ | disable_functions = proc_open, popen, disk_free_space, | ||
+ | |||
+ | Add line above to / | ||
+ | </ | ||
+ | |||
+ | //Note: This may not be your file location for php.ini. If it isn't you'll need to find it manually.// | ||
+ | |||
+ | == SSH == | ||
+ | |||
+ | Remove keys: | ||
+ | < | ||
+ | rm / | ||
+ | rm / | ||
+ | </ | ||
+ | |||
+ | Modify config: | ||
+ | < | ||
+ | Modify / | ||
+ | - PermitRootLogin no | ||
+ | - PermitEmptyPasswords no | ||
+ | - PubkeyAuthentication no | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Windows ==== | ||
+ | |||
+ | === Password Changes === | ||
+ | |||
+ | Change all passwords for local users: | ||
+ | < | ||
+ | Get-LocalUser | Set-LocalUser -password (read-host -AsSecureString) | ||
+ | </ | ||
+ | |||
+ | Change all passwords for domain users: | ||
+ | < | ||
+ | Get-ADUser -Filter * | Out-GridView -PassThru | Set-ADAccountPassword -NewPassword (Read-Host -AsSecureString) -Reset | ||
+ | </ | ||
+ | |||
+ | //Note: These must be ran in an administrative powershell. When ran there is sometimes no prompt. Just type in the password and hit enter.// | ||
+ | |||
+ | |||
+ | === Firewall === | ||
+ | |||
+ | Check that all the profiles are enabled and it blocks all inbound by default: | ||
+ | < | ||
+ | Windows + R, wf.msc > Windows Defender Firewall Properties | ||
+ | </ | ||
+ | |||
+ | //Note: If the option to enable the firewall is grayed out, that means it is being disabled by the registry or group policy// | ||
+ | |||
+ | Remove rules you don't need: | ||
+ | < | ||
+ | Windows + R, wf.msc > Inbound Rules | ||
+ | </ | ||
+ | Look for any that allow all traffic inbound. | ||
+ | |||
+ | |||
+ | === Other User Management === | ||
+ | |||
+ | < | ||
+ | Windows Key + R, compmgmt.msc > Local Users and Groups | ||
+ | |||
+ | - Remove all users that aren't required. | ||
+ | - Remove users from groups that they don't need to be apart of. | ||
+ | - Disable the default Administrator and Guest account | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Service Hardening === | ||
+ | |||
+ | == SMB == | ||
+ | |||
+ | Check SMB Version: | ||
+ | < | ||
+ | Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol | ||
+ | |||
+ | OR | ||
+ | |||
+ | Get-SmbServerConfiguration | Select EnableSMB1Protocol | ||
+ | </ | ||
+ | |||
+ | |||
+ | If SMBv1 is enabled then disable it: | ||
+ | < | ||
+ | Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol | ||
+ | |||
+ | OR | ||
+ | |||
+ | Set-SmbServerConfiguration -EnableSMB1Protocol $false | ||
+ | </ | ||
+ | |||
+ | If SMB is required then enable SMBv2 which is secure: | ||
+ | < | ||
+ | Set-SmbServerConfiguration -EnableSMB2Protocol $true | ||
+ | </ | ||
+ | |||
+ | == RDP == | ||
+ | |||
+ | Enable Network Level Authentication: | ||
+ | < | ||
+ | Windows Key + R, systempropertiesremote, | ||
+ | |||
+ | If this option is grayed out check out: [[https:// | ||
+ | </ | ||
+ | |||
+ | Make sure only required users are in RDP group: | ||
+ | < | ||
+ | Windows Key + R, systempropertiesremote, | ||
+ | |||
+ | Windows Key + R, compmgmt.msc, | ||
+ | </ | ||
+ | |||
+ | ==== Finished this checklist? ==== | ||
+ | |||
+ | Find much more at [[https:// |