Cyber Security Cheat Sheet

Security Fundamentals

ConceptDefinitionExample
CIA TriadConfidentiality, Integrity, AvailabilityEncryption for confidentiality, checksums for integrity, redundancy for availability
Defense in DepthMultiple layers of security controlsFirewall + IDS + encryption + access controls
Principle of Least PrivilegeUsers get minimum access neededDatabase user only gets read access if that's all they need
Zero TrustNever trust, always verifyContinuous authentication and authorization checks
Threat ModelingIdentifying potential security threatsSTRIDE model: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege

Common Attack Types

AttackDescriptionDefense
SQL InjectionInjecting malicious SQL codeInput validation, parameterized queries, least privilege
Cross-Site Scripting (XSS)Injecting malicious scripts into web pagesInput sanitization, output encoding, CSP headers
Cross-Site Request Forgery (CSRF)Tricking users to execute unwanted actionsCSRF tokens, same-site cookies, origin headers
Man-in-the-MiddleIntercepting communicationsEncryption, certificate validation, VPNs
PhishingTricking users to reveal sensitive infoSecurity awareness training, email filtering, MFA
Denial of Service (DoS)Overwhelming systems to deny serviceRate limiting, traffic filtering, redundancy
Buffer OverflowWriting beyond buffer boundariesBounds checking, safe coding practices, ASLR
RansomwareEncrypting data and demanding paymentRegular backups, endpoint protection, user training

Authentication & Authorization

MethodDescriptionAdvantages/Disadvantages
PasswordsSomething you knowEasy to implement, vulnerable to brute force
Multi-Factor Authentication (MFA)Multiple verification factorsMore secure, can be inconvenient
BiometricsSomething you are (fingerprint, face)Difficult to forge, privacy concerns
Single Sign-On (SSO)One login for multiple systemsConvenience, centralized control
OAuthAuthorization frameworkDelegated access, token-based
OpenID ConnectAuthentication layer on OAuthStandardized identity, token validation
Role-Based Access Control (RBAC)Permissions based on rolesScalable, manageable access control
Mandatory Access Control (MAC)System-enforced access controlHigh security, less flexible

Cryptography

TypeAlgorithmUse CaseKey Size
Symmetric EncryptionAESData encryption128, 192, 256 bits
Symmetric Encryption3DESLegacy systems112, 168 bits
Asymmetric EncryptionRSAKey exchange, digital signatures2048, 3072, 4096 bits
Asymmetric EncryptionECCMobile, IoT devices256, 384, 521 bits
Hash FunctionSHA-256Integrity verification256 bits
Hash FunctionSHA-3Future-proof hashing224, 256, 384, 512 bits
Hash FunctionMD5Deprecated128 bits
Key ExchangeDiffie-HellmanSecure key exchange2048+ bits

Network Security

TechnologyPurposeImplementation
FirewallFilter network trafficRule-based packet filtering
VPNSecure remote accessIPSec, SSL/TLS tunneling
Intrusion Detection System (IDS)Detect suspicious activitySignature-based, anomaly-based
Intrusion Prevention System (IPS)Block detected threatsInline traffic inspection
Network SegmentationIsolate network sectionsVLANs, subnetting, microsegmentation
SIEMSecurity information and event managementLog aggregation, correlation, analysis
DMZIsolated network for public servicesWeb servers, email servers
Port SecurityControl access to network portsMAC address filtering

Security Protocols

ProtocolLayerPurposeSecurity Feature
SSL/TLSTransportSecure communicationEncryption, authentication
IPSecNetworkSecure IP communicationAuthentication, encryption, integrity
SSHApplicationSecure remote accessEncrypted shell access
SFTPApplicationSecure file transferSSH-based file transfer
HTTPSApplicationSecure web communicationHTTP over TLS
WPA3NetworkSecure WiFiIndividualized data encryption
KerberosApplicationNetwork authenticationTrusted third-party authentication
SAMLApplicationSingle sign-onSecurity assertion markup language

Vulnerability Management

ProcessDescriptionTools
Vulnerability ScanningSystematic search for security weaknessesNessus, OpenVAS, Qualys
Penetration TestingSimulated attacks to find vulnerabilitiesMetasploit, Burp Suite, Nmap
Risk AssessmentEvaluate potential security risksCVSS, DREAD, OCTAVE
Asset ManagementTrack and manage security of assetsCMDB, asset discovery tools
Patch ManagementManage software updates and patchesWSUS, Red Hat Satellite, Ansible
Security AuditingSystematic evaluation of security controlsCompliance tools, configuration checkers

Incident Response

PhaseActivitiesTools
PreparationDevelop IR plan, train staff, establish communicationIR plans, communication tools, training materials
IdentificationDetect and analyze security incidentsSIEM, IDS, forensic tools
ContainmentLimit the scope of the incidentNetwork isolation, access controls
EradicationRemove the cause of the incidentAntivirus, patching, system restoration
RecoveryRestore systems and servicesBackups, system monitoring
Lessons LearnedDocument and analyze the incidentDocumentation, metrics, process improvement

Security Frameworks & Compliance

FrameworkPurposeKey Components
NIST Cybersecurity FrameworkManage cybersecurity risksIdentify, Protect, Detect, Respond, Recover
ISO 27001Information security managementISMS, risk management, controls
COBITIT governance and managementProcess model, maturity model, metrics
PCI DSSPayment card industry securityCardholder data protection, network security
SOXFinancial reporting accuracyInternal controls, audit requirements
HIPAAHealth information privacyPrivacy rule, security rule, breach notification
GDPRData protection and privacyConsent, rights of data subjects, breach reporting

Security Tools

CategoryToolFunction
Network ScanningNmapPort scanning, network discovery
Web Application TestingBurp SuiteWeb vulnerability assessment
Exploitation FrameworkMetasploitPenetration testing, exploit development
Packet AnalysisWiresharkNetwork protocol analysis
Vulnerability ScannerNessusAutomated vulnerability detection
Forensic AnalysisAutopsyDigital forensics and investigation
Password CrackingJohn the RipperPassword recovery and testing
System MonitoringSysmonSystem activity monitoring

Secure Coding Practices

PracticeDescriptionImplementation
Input ValidationValidate all user inputsWhitelist validation, parameterized queries
Output EncodingEncode data for proper contextHTML encoding, URL encoding
Error HandlingDon't leak system informationGeneric error messages, logging
AuthenticationImplement strong authenticationMFA, secure session management
AuthorizationVerify access rightsRole-based access, principle of least privilege
Session ManagementSecure session handlingSecure cookies, session timeout
CryptographyUse strong encryptionStandard algorithms, proper key management
Secure ConfigurationFollow security best practicesRemove default accounts, disable unnecessary services

Emerging Security Technologies

TechnologyApplicationSecurity Benefits
Zero Trust ArchitectureNetwork security modelContinuous verification, micro-segmentation
Deception TechnologyAttack detection and responseEarly detection, attacker engagement
Behavioral AnalyticsUser and entity behavior analysisThreat detection, anomaly identification
Security OrchestrationAutomate security operationsEfficiency, consistency, scalability
Threat IntelligenceProactive threat detectionContext, indicators of compromise
Blockchain SecurityDistributed ledger securityImmutability, transparency, decentralization
Cloud SecuritySecure cloud environmentsEncryption, identity management, compliance