CyberSecurity

I have developed a range of practical scenarios for each topic. Should you need access to these resources, please do not hesitate to contact me. Furthermore, I have delivered over 100 tailored Cybersecurity Assessment Reports for a wide variety of organizations, effectively addressing their distinct risk profiles and specific requirements.

The Complete Architecture’s Guide

CyberSecurity : The Complete Architecture's Guide

Introductory

Layers of security in cybersecurity

Security LayerDescriptionKey Measures
1. Physical SecurityProtects physical components of information systems.Secure access, surveillance, environmental controls
2. Network SecuritySafeguards infrastructure and data during transmission.Firewalls, IDPS, VPNs, secure networks
3. Endpoint SecurityProtects individual devices such as computers and mobile devices.Antivirus, antimalware, EDR tools, device encryption
4. Application SecuritySecures applications from vulnerabilities throughout their lifecycle.Secure coding, testing, patch management, WAFs
5. Data SecurityProtects sensitive data from unauthorized access and leaks.Data encryption, access controls, data masking, backups
6. User Awareness and TrainingEnsures employees recognize threats and understand security policies.Training on phishing, social engineering, safe practices
7. Identity and Access ManagementManages user identities and controls access based on roles.MFA, SSO, strict password policies
8. Incident Response and ManagementEstablishes plans for responding to security incidents.Incident response team, drills, reporting procedures
9. Security Monitoring and LoggingMonitors systems for signs of security breaches continuously.SIEM systems for log aggregation and analysis
10. Compliance and GovernanceEnsures adherence to regulations and standards.Periodic audits, assessments, and compliance checks

Implementing these layered security controls provides a comprehensive defense against various threats, enhancing resilience and reducing the likelihood of successful attacks.

Information Assurance (IA)

IA is for protecting information system.

CIA

Integrity

  • Having AntiVirus
  • Having Policies
  • Data will not be tampered(altered or destroyed)

Availability

  • Who are allowed/blocked to access

Authetication

  • Identify facets

Confidentiality

  • Access by those authorized

Non-repudiation

  • someone can not deny his/her action

Network Defence Approch [1]

Preventive

  • Firewalls
  • Prevention Systems(IDS, IPS systems like snort)
  • Intrusion Detection
  • AntiVirus

Reactive

  • Responds to past and present threads
  • Cover net monitoring for anomalies, forensics, and incident response
  • Ad-blockers
  • Spam filters
  • Password manager
  • AntiVirus programming

Retrospective

  • Causes for atk(after atks)
  • Use protocols to:
  • Analyze
  • Monitored net traffic
  • Prevent it from ever happening

Proactive

  • Anticipation of an atk against:
  • With aims of countering future atks.

Data security and threat detection

Terminology in Data Security

TermDefinitionCommon Use Cases
True Positive (TP)A correct identification of a security threat. The system correctly detects an actual threat.Identifying a successful malware attack on a system.
True Negative (TN)A correct identification of benign activity. The system correctly identifies that there is no threat.Confirming that a legitimate user activity is not malicious.
False Positive (FP)An incorrect identification where a benign activity is incorrectly flagged as a threat.Detecting legitimate software behavior as malware, leading to unnecessary alerts.
False Negative (FN)An incorrect identification where an actual threat goes undetected or is incorrectly classified as benign.Failing to identify a security breach because the detection system did not recognize it.
PrecisionThe ratio of true positives to the total predicted positives (TP / (TP + FP)). Higher precision means fewer false positives.Important in environments where false alerts can disrupt operations.
Recall (Sensitivity)The ratio of true positives to the total actual positives (TP / (TP + FN)). Higher recall means better detection of threats.Critical for ensuring that security measures catch as many threats as possible.
F1 ScoreThe harmonic mean of precision and recall, providing a balance between the two (2 (Precision Recall) / (Precision + Recall)).Useful in scenarios where both false positives and false negatives are costly.
ROC CurveA graphical representation of the true positive rate versus the false positive rate.Helps evaluate the trade-offs between sensitivity and specificity in threat detection models.

Use Cases for Each Term

  • True Positive (TP):

    • Security software successfully identifies and quarantines a phishing email that contains a malicious link.
  • True Negative (TN):

    • An employee’s genuine access to a secure document is correctly classified as permitted, preventing unnecessary alerts to security teams.
  • False Positive (FP):

    • An application that performs normal data transmission is flagged and quarantined as potential data exfiltration, leading to communication disruptions.
  • False Negative (FN):

    • A new strain of malware infiltrates the network, but the detection system fails to recognize it due to outdated signatures, allowing the malware to execute.
  • Precision:

    • In a company where every alert has a significant operational cost, high precision is crucial to minimize unnecessary investigations.
  • Recall (Sensitivity):

    • In a healthcare environment, high recall is vital to catch all potential breaches that might expose patient information, regardless of the resulting false alarms.
  • F1 Score:

    • In a fraud detection system where both missing fraudulent transactions and wrongly flagging legitimate transactions can lead to financial losses.
  • ROC Curve:

    • A security analyst uses the ROC curve to determine the optimal threshold for a new intrusion detection system that balances the rates of true and false positives.

These metrics guide organizations in their threat detection efforts, helping them fine-tune their security measures while minimizing operational disruptions and maximizing security efficacy. Regular analysis of these metrics can inform necessary adjustments and enhancements to detection algorithms and configurations.

Indicates the Techniques

PhaseDescriptionTechniques (Examples)
ReconnaissanceGathering information about the target to identify vulnerabilities.- Open Source Intelligence (OSINT)
- Network Scanning
- Social Engineering
Resource DevelopmentEstablishing or acquiring resources needed for the attack.- Malware Development
- Infrastructure Setup (e.g., servers for command and control)
Initial AccessGaining entry into the target environment.- Phishing (e.g., Email attachments, links)
- Exploit Public-Facing Applications
ExecutionRunning malicious code on the target system.- Command-Line Interface (CLI) Execution
- Malicious Scripts
PersistenceMaintaining access to the target over time.- Registry Run Keys/Startup Folder
- Scheduled Tasks
Privilege EscalationGaining higher privileges than initially acquired.- Exploiting Vulnerabilities
- Bypass User Account Control (UAC)
Defense EvasionAvoiding detection and defensive measures.- Obfuscated Files or Information
- Timestomp
Credential AccessObtaining valid credentials for further access.- Credential Dumping
- Keylogging
DiscoveryUnderstanding the environment for further action.- System Information Discovery
- Network Share Discovery
Lateral MovementMoving within the network after initial access.- Remote Services (e.g., SMB, RDP)
- Pass-the-Hash
CollectionGathering sensitive data from the target.- Data Staged for Exfiltration
- Screen Capture
Command and ControlEstablishing a channel to control compromised systems.- Web Service (e.g., HTTP, HTTPS)
- DNS Tunneling
ExfiltrationExtracting data from the target.- Data Encoding/Obfuscation
- Exfiltration Over Command and Control Channel
ImpactDisrupting the target’s operations or damaging systems.- Data Destruction
- Service Stop

Common vulnerability

VulnerabilityDescriptionDanger LevelCommon Use-CasesPrevalence (%)Challenges Faced by CompaniesMitigation StrategiesExample AttacksSpecific Attack Vectors
XSSEnables attackers to execute scripts in the user’s browser, potentially stealing cookies.HighUser input fields, comment sections~40%Proper input sanitization, CSPSanitize user inputs, use Content Security Policy (CSP)Stealing session cookies, redirecting usersStored XSS, Reflected XSS, DOM-based XSS
CSRFTricks users into making unwanted actions on web applications where they are authenticated.MediumForm submissions, state-changing requests~30%Tokenization, user session managementImplement anti-CSRF tokens, same-site cookiesChanging user email or password without consentState-changing requests
SQL InjectionAllows attackers to execute arbitrary SQL queries on the database, leading to data exposure or manipulation.HighDynamic database queries~35%Input validation, proper ORM usageUse prepared statements, parameterized queriesExtracting sensitive data, deleting recordsTautology-based, Union-based, Error-based
XXEOccurs when an external entity is injected through XML input, leading to data exposure.HighXML processing, API integrations~25%Misconfigured parsersDisable DTD processing, use safer librariesReading local files, SSRF (Server-Side Request Forgery)External entity resolution
LFIAllows an attacker to include files on a server through user input.HighMisconfigured web applications~20%Input validation, file access controlsValidate and sanitize user inputs, restrict file pathsAccessing sensitive files (e.g., /etc/passwd)Directory traversal
RCERemote Code Execution allows attackers to execute arbitrary commands on the server.CriticalFile upload, deserialization vulnerabilities~15%Code reviews, secure coding practicesValidate inputs, use whitelists for file typesExecuting shell commands, malware installationCode injection, Command injection
Insecure Direct Object Reference (IDOR)Allows attackers to access or modify objects that they are not authorized to.MediumParameter manipulation in URL requests~20%Authorization checksImplement access controls, validate user permissionsAccessing other users’ resourcesURL manipulation
Open RedirectAllows an attacker to redirect users to an untrusted site, often used for phishing.MediumLink manipulation~10%Input validation, whitelistingValidate redirect URLs, use a whitelist for valid URLsPhishing attacks, redirecting to malicious sitesRedirecting with query parameters
HTTP Response SplittingAttacker manipulates HTTP headers to inject additional responses.MediumUnvalidated inputs in headers~5%Header validationSanitize user inputs, validate and encode headersHTTP header injection, session fixationHeader injection