PadhaikoAll subjects

Ethical and Legal Aspects of Cyber Security

Network and Cyber Security (ENCT 463)

Open in the Padhaiko app

7.1 Cyber Law and Regulations (e.g., GDPR, CCPA)

Technical controls alone cannot compel organizations to protect user privacy or report breaches promptly. Cyber laws and data-protection regulations establish legally binding duties on how personal data is collected, processed, stored, and disclosed, backed by statutory penalties.

1. General Data Protection Regulation (GDPR)

Enforced across the EU/EEA since 2018, the GDPR (Regulation EU 2016/679) has extraterritorial scope: it applies to any organization worldwide—including companies in Nepal—that offers goods/services to or monitors the behavior of individuals located in the EU/EEA.

Definition

Seven Core GDPR Data Processing Principles (Article 5)

  1. Lawfulness, Fairness, and Transparency: Processing requires a valid legal basis (e.g., explicit consent, contract performance, legal obligation) clearly communicated to the user.
  2. Purpose Limitation: Data must be collected only for specified, explicit, and legitimate purposes.
  3. Data Minimization: Collect only what is strictly necessary for the stated purpose.
  4. Accuracy: Personal data must be kept accurate and up to date.
  5. Storage Limitation: Retain identifiable data no longer than necessary.
  6. Integrity and Confidentiality (Security): Protect data against unauthorized access, loss, or destruction using appropriate technical and organizational measures (e.g., encryption, pseudonymization).
  7. Accountability: The data controller must be able to demonstrate compliance.

2. California Consumer Privacy Act (CCPA / CPRA)

Enacted in California (and expanded by the CPRA), the CCPA protects residents of California by regulating for-profit businesses that meet revenue, data-volume, or data-broker thresholds:

AspectGDPR (European Union)CCPA / CPRA (California)
ScopeAny entity processing EU/EEA residents' personal data globally (public or private)For-profit businesses meeting revenue () or data-volume thresholds serving California residents
Consent ModelOpt-in / Lawful basis required before processingOpt-out model for sale/sharing (except minors, who require opt-in)
Breach ReportingMandatory notice to supervisory authorityPrivate right of action for unencrypted data breaches; state AG notification rules
Penalty StructureUp to or global annual turnover (whichever is higher)Per-violation statutory civil penalties ( unintentional / intentional) + consumer damages

7.2 Security Policy Framework (SPF), MITRE ATT&CK Framework

1. Security Policy Framework (SPF)

A Security Policy Framework (SPF) translates high-level business and legal mandates into actionable day-to-day controls through a four-tier document hierarchy:

Definition

Four-Tier Security Governance Hierarchy

  1. Policies (Strategic / Mandatory): High-level statements approved by senior leadership defining what must be protected and why (e.g., Information Security Policy, Acceptable Use Policy, Access Control Policy). Technology-agnostic and rarely changed.
  2. Standards (Mandatory / Specific): Uniform technical requirements specifying what technologies or baselines enforce the policy (e.g., "All databases must use AES-256 encryption at rest; admin SSH requires FIDO2 MFA").
  3. Procedures (Mandatory / Operational): Step-by-step instructions explaining how staff execute a task (e.g., "How to revoke an employee's Active Directory and VPN access within 1 hour of termination").
  4. Guidelines (Advisory / Recommended): Flexible best-practice recommendations when no rigid standard applies (e.g., password passphrase tips for personal accounts).

At the national and enterprise governance level (such as the UK Security Policy Framework), an SPF groups security outcomes across governance & risk management, personnel security (vetting and awareness), physical security, information & data handling, and technical cyber resilience.

2. MITRE ATT&CK Framework

MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) is a globally accessible knowledge base documenting real-world cyber adversary behaviors observed in actual intrusions.


7.3 Security Auditing and Compliance

Compliance ensures an organization adheres to external laws, regulations, and industry standards (e.g., ISO/IEC 27001, PCI-DSS for payment cards, HIPAA for healthcare, SOC 2 for SaaS), as well as its own internal security policies. Security auditing is the systematic, evidence-based evaluation that verifies whether controls are actually designed properly and operating effectively.

Types of Security Audits
Audit TypeConducted ByPurpose & StrengthsLimitations
Internal Audit (First-Party)Organization's own internal audit/GRC teamIdentifies policy drift and control gaps early before external inspectionsLower perceived independence; risk of internal bias
External / Third-Party AuditAccredited independent assessors (QSA, ISO CB, CPA firm)Required for formal certification (ISO 27001, PCI-DSS AoC, SOC 2 Type II) and partner trustPoint-in-time or periodic snapshot; costly
Technical vs. Compliance AuditSecurity engineers or GRC auditorsTechnical audits verify configs/logs/patches; compliance audits verify policies, training, and evidence trailsCompliance ("checkbox security") alone does not guarantee resilience without technical validation

Standard Audit Lifecycle

  1. Scope & Criteria Definition: Identify systems in scope (e.g., Cardholder Data Environment for PCI-DSS) and the target control baseline.
  2. Evidence Collection & Sampling: Gather system configurations, firewall rulesets, SIEM retention logs, access-review sign-offs, and interview personnel.
  3. Gap Analysis & Findings Classification: Record non-conformities (Critical/Major/Minor observations) where actual state deviates from required policy.
  4. Remediation & Follow-Up: Assign corrective action owners with deadlines (POA&M) and re-verify closure.

7.4 Penetration Testing and Vulnerability Scanning

While both assess technical weaknesses, vulnerability scanning and penetration testing serve distinct roles in a mature security program.

1. Engagement Visibility Models in Penetration Testing

2. Penetration Testing Methodology (PTES)

  1. Pre-Engagement & Rules of Engagement (RoE): Obtain written authorization, define exact in-scope IPs/domains, permitted testing hours, forbidden actions (e.g., no destructive DoS), and emergency contacts.
  2. Reconnaissance (Information Gathering): Passive OSINT + active host/port/service enumeration.
  3. Threat Modeling & Vulnerability Analysis: Identify exploitable misconfigurations, CVEs, and web logic flaws (often seeded by automated vulnerability scanners).
  4. Exploitation: Safely execute exploits to confirm whether a flaw is genuinely reachable and impactful (eliminating scanner false positives).
  5. Post-Exploitation & Pivoting: Demonstrate real business risk—privilege escalation, credential harvesting, lateral movement—without damaging production data.
  6. Reporting & Retesting: Deliver an executive risk summary and technical reproduction steps with remediation advice, followed by a confirmation retest after fixes.
AspectVulnerability ScanningPenetration Testing
Primary Question"What known CVEs or misconfigurations appear to exist?""Can an attacker actually exploit and chain flaws to compromise critical assets?"
ExecutionAutomated tools (Nessus, OpenVAS, Qualys)Human-led manual exploitation + specialized tools
Chaining & Business LogicRarely chains multi-step flaws or detects authorization logic bugsActively chains low/medium issues (e.g., SSRF + IDOR) into high-impact breaches
CadenceFrequent (weekly / continuous)Periodic (annual or after major architecture changes)

7.5 Ethics in Cyber Security

Cyber security professionals possess privileged access to corporate networks, sensitive user data, and offensive exploitation tools. Professional ethics ensures technical capability is used exclusively to defend systems and protect society.

Core Ethical Principles (ISC2 & ACM/IEEE Codes)

  1. Protect Society and Public Welfare: Prioritize the safety, privacy, and resilience of critical infrastructure and users over convenience or commercial pressure.
  2. Act Honorably, Honestly, and Legally: Never access, copy, modify, or test any system without explicit, prior written authorization. Curiosity does not excuse unauthorized access.
  3. Confidentiality of Discovered Data: During an audit or penetration test, if you encounter customer PII, medical records, or trade secrets, capture only minimal proof-of-concept metadata (e.g., table names or row count), never bulk-download sensitive records, and safeguard findings under strict NDA.
  4. Objectivity & Avoidance of Conflict of Interest: Report vulnerabilities accurately without exaggerating severity to sell services or suppressing findings to appease management.
  5. Continuous Competence: Maintain technical proficiency and refrain from claiming expertise beyond actual capability.

7.6 Ethical Hacking and Responsible Disclosure

1. Classification of Hackers

Hacker Categories by Authorization and Intent
CategoryAuthorizationIntent & Behavior
White Hat (Ethical Hacker)Explicit written permission (RoE / Bug Bounty scope)Tests defenses to find and help fix vulnerabilities legally
Gray HatNo prior permission, but non-malicious intentProbes systems without consent and notifies owner (often still illegal under cybercrime laws!)
Black HatUnauthorizedExploits flaws for financial gain, espionage, extortion, or disruption

2. Vulnerability Disclosure Models

When a researcher discovers a previously unknown vulnerability in software or a live service, three disclosure approaches exist:

Example 1

Evaluating GDPR Maximum Fine and Coordinated Disclosure Timeline (6 marks)

A global cloud SaaS firm with an annual worldwide turnover of suffers a data breach exposing EU customer records due to unencrypted storage and missing lawful consent (an Article 5/6 core violation), and waits before notifying regulators. (a) Calculate the maximum statutory GDPR administrative fine the supervisory authority could impose. (b) Separately, an ethical researcher reports an authentication bypass bug to the firm under a standard -day coordinated disclosure policy, and the firm requests a -day grace extension to finalize a patch. Explain how the timeline works and why responsible disclosure is preferred over full disclosure.

Calculate the GDPR upper-tier statutory cap (Article 83(5)):

Compute of :

Comparing with the fixed ceiling:

(Note: The delayed -day notification violates the -hour rule under lower-tier Article 83(4), capped at , though GDPR caps combined penalties for the same incident at the gravest infringement's ceiling of .)

Evaluate the Coordinated Disclosure Timeline: Under a -day coordinated disclosure window plus a mutually agreed -day grace period (), the researcher keeps exploit details confidential while the vendor engineers, tests, and ships the patch. Once the patch is released (or the -day deadline expires), a CVE and technical advisory are published so administrators apply the fix. This avoids exposing unpatched customers to immediate exploitation under full disclosure while still holding the vendor accountable.

Answer:

(a) Maximum GDPR fine is ( of exceeds ). (b) Coordinated disclosure gives the vendor to patch privately before public advisory release, protecting users better than immediate full disclosure.


7.7 Privacy Concerns and Data Protection

Rapid growth of telemetry, mobile tracking, cloud storage, and AI analytics creates significant privacy risks: pervasive behavioral profiling, unauthorized secondary data sharing/monetization, re-identification of supposedly "anonymous" datasets, and large-scale breach exposure.

Technical & Architectural Data Protection Controls

  1. Privacy by Design and by Default: Embed privacy directly into software architecture—collect the bare minimum attributes, disable non-essential tracking by default, and enforce short retention timers.
  2. Anonymization vs. Pseudonymization:
    • Anonymization: Irreversibly strips and generalizes/aggregates identifiers so individuals can no longer be re-identified (outside GDPR scope if truly irreversible).
    • Pseudonymization: Replaces direct identifiers (name, citizenship no.) with a reversible token/key kept separately. Reduces breach exposure, but remains regulated personal data because re-identification is still possible with the key.
  3. Encryption & Key Management: Encrypt sensitive data at rest (AES-256) and in transit (TLS 1.3), and tokenize payment/PII fields.
  4. Data Loss Prevention (DLP): Monitors endpoints, email gateways, and cloud egress for unauthorized movement of classified patterns (credit card numbers, national IDs, source code) and blocks or quarantines leaks.

7.8 Intellectual Property and Digital Rights Management

1. Intellectual Property (IP) Protection

Intellectual Property protects creations of the mind—software code, algorithms, brand identity, and creative works—from unauthorized copying or theft:

Four Primary Forms of Intellectual Property
IP TypeWhat It ProtectsTypical Cyber Security Context
CopyrightOriginal expression (source code, documentation, UI assets, books, media)Software piracy, unauthorized redistribution, open-source license compliance (GPL/MIT)
PatentNovel, non-obvious technical inventions or processesProprietary hardware security modules, specialized cryptographic/network protocols
TrademarkBrand names, logos, domain identifiersStopping phishing/typosquatting domains and counterfeit apps impersonating a brand
Trade SecretConfidential business/technical info with economic value (proprietary algorithms, customer lists)Protected via NDAs, RBAC, DLP, and encryption rather than public registration

2. Digital Rights Management (DRM)

Digital Rights Management (DRM) refers to technical access-control and encryption mechanisms embedded in media, e-books, and proprietary software to enforce licensing terms after the file reaches the user's device:


7.9 Cyber law in the context of Nepal

Nepal's primary statutory framework governing electronic commerce, digital signatures, and cyber offenses is the Electronic Transactions Act (ETA), 2063 (2006) (implemented alongside the Electronic Transactions Rules, 2064), complemented by newer privacy and policy instruments.

1. Electronic Transactions Act (ETA), 2063 — Institutional & Legal Pillars

2. Major Cyber Offenses under ETA 2063 (Chapter 9, Sections 44–59)

Key Cyber Offenses and Provisions under Nepal's ETA 2063
SectionOffenseDescription & Examples
Section 44Pirating, Destroying, or Altering Computer Source CodeKnowingly or with bad intent pirating, destroying, or altering computer source code that the law requires to be kept as it is (up to 3 years and/or NPR 200,000)
Section 45Unauthorized Access to Computer MaterialsUsing a computer to access its programs or data without the owner's authorization, or going beyond the authorization given (up to 3 years and/or NPR 200,000)
Section 46Damage to Any Computer and Information SystemKnowingly and with bad intent destroying, deleting, altering or disrupting information in a computer system, or reducing its value or utility, to cause wrongful loss or damage (malware and DoS attacks typically fall here)
Section 47Publication of Illegal Material in Electronic FormPublishing or displaying electronic material that is prohibited by law, contrary to public morality or decency, or that spreads hate or jealousy or harms harmony among castes and communities (up to 5 years and/or NPR 100,000) (frequently invoked—and debated—in Nepal)
Section 48Violation of ConfidentialityA person who gained access to records, correspondence or information under powers given by the Act or its Rules and discloses them to an unauthorized person (up to 2 years and/or NPR 10,000)
Section 52Computer FraudFraudulently creating or publishing a digital signature certificate, or obtaining financial benefit (bill payment, account balance, ATM card and similar) by fraud; the gain is recovered from the offender (up to 2 years and/or NPR 100,000)

3. Complementary Frameworks & Practical Challenges in Nepal

Example 2

Scoping a Penetration Test and Mapping Findings to MITRE ATT&CK (Exam Model) (6 marks)

A Nepalese fintech company hires your security team to test its mobile API and cloud backend before launch. (a) Which testing visibility model (Black-Box, Gray-Box, or White-Box) is best suited for a -week pre-launch engagement, and what must be signed before sending the first packet? (b) During testing, you gain initial access via a spear-phished developer token, execute a bash script on the container, and pivot to an internal database. Map these three actions to MITRE ATT&CK Tactics and state the ethical duty regarding real customer records seen on the staging DB.

Select Testing Model and Pre-Engagement Authorization: A Gray-Box test is optimal for a -week window: providing API documentation, Swagger schemas, and standard test user accounts avoids wasting days guessing endpoints while still testing real authentication, authorization (IDOR), and backend protections. Before any active probing begins, both parties must sign a formal Rules of Engagement (RoE) and Written Authorization specifying exact in-scope URLs/IPs, testing window, excluded DoS tests, and emergency escalation contacts.

Map Attack Chain to MITRE ATT&CK Tactics & Apply Ethics:

  • Using a stolen developer token to enter the environment: Initial Access (e.g., Valid Accounts T1078).
  • Running a bash script inside the container: Execution (Command and Scripting Interpreter T1059).
  • Moving from the app container to the internal database: Lateral Movement.
  • Ethical Duty on Discovered PII: Immediately stop bulk querying, capture only sanitized proof-of-concept evidence (e.g., masked column headers), never exfiltrate or store real customer PII locally, and report the exposure confidentially to the client under NDA.
Answer:

Choose Gray-Box testing backed by signed Written Authorization / RoE; map the steps to Initial Access Execution Lateral Movement in MITRE ATT&CK; and restrict evidence to minimal masked PoCs without copying real customer PII.

Example 3

Evaluating a Cyber Incident Under Nepal's ETA 2063 and Privacy Principles (5 marks)

A former IT employee uses an unrevoked VPN credential to log into a hospital server in Kathmandu, downloads patient medical records to sell online, and wipes the server's billing database. Identify the specific offenses under Nepal's Electronic Transactions Act (ETA), 2063, the privacy violations, and two organizational policy/audit controls that would have prevented or detected the breach.

Map Actions to Nepal's ETA 2063 and Privacy Law:

  • Logging in after termination without permission: Section 45 (Unauthorized Access to Computer Materials)—using lingering credentials without authorization is still unlawful entry.
  • Wiping the billing database: Section 46 (Damage to Computer and Information System).
  • Disclosing/selling patient records: mainly a privacy violation under the Individual Privacy Act, 2075 (personal and health information may not be collected or disclosed without consent). ETA Section 48 covers disclosure only by persons who obtained records under powers given by the Act, so it does not fit an ex-employee directly.

Specify Preventive Policy and Audit Controls:

  1. Offboarding Procedure in the Security Policy Framework (SPF): Enforce a mandatory termination checklist revoking VPN, SSO, and SSH keys within of HR separation.
  2. Periodic Access Audits & Centralized SIEM Monitoring: Run monthly user-access reviews to catch orphaned accounts and alert on anomalous off-hours VPN logins or bulk database exports (DLP).
Answer:

The incident violates ETA 2063 Sections 45 (Unauthorized Access) and 46 (System Damage) plus the Individual Privacy Act, 2075; strict SPF offboarding procedures and periodic access audits/DLP would mitigate it.


Exercises

Question 1

An e-commerce company with global annual turnover of processes personal data of EU customers. (a) Calculate the maximum GDPR administrative fine for a Tier 1 infringement (e.g., failing to report a breach within ) and a Tier 2 infringement (e.g., processing without lawful basis). (b) At what global annual turnover does the revenue cap overtake the fixed ceiling?

Compute Tier 1 and Tier 2 GDPR statutory caps:

  • Tier 1 (Article 83(4)): .
  • Tier 2 (Article 83(5)): .

Find the turnover crossover point for Tier 2: Set :

Above annual turnover, of turnover exceeds .

Answer:

(a) Tier 1 maximum ; Tier 2 maximum . (b) exceeds when global annual turnover exceeds .

Question 2

Compare GDPR and CCPA/CPRA on geographic scope, consent model, breach reporting, and penalties, and distinguish between anonymization and pseudonymization.

Compare GDPR and CCPA/CPRA:

  • Scope: GDPR protects EU/EEA residents globally across public and private entities; CCPA/CPRA protects California residents against qualifying for-profit businesses.
  • Consent: GDPR mandates an explicit lawful basis (opt-in for consent) before processing; CCPA uses an opt-out model allowing consumers to block sale/sharing of personal info.
  • Breach Notification & Fines: GDPR mandates -hour authority reporting and fines up to ; CCPA enforces statutory per-violation penalties and a private right of action for breaches.

Distinguish Anonymization vs. Pseudonymization: Anonymization irreversibly removes identifying links so data subjects can never be re-identified (placing the dataset outside privacy regulations). Pseudonymization substitutes direct identifiers with reversible tokens/keys stored separately—improving security, while still remaining regulated personal data.

Answer:

GDPR is an opt-in/lawful-basis global regime with breach reporting and up to turnover fines, whereas CCPA/CPRA is an opt-out consumer regime for California residents. Anonymization is irreversible; pseudonymization is reversible with a separate key and remains personal data.

Question 3

Explain the four levels of a Security Policy Framework (SPF) (Policies, Standards, Procedures, Guidelines) and describe how the MITRE ATT&CK framework helps SOC and red teams.

Outline the four SPF governance tiers:

  1. Policies: High-level mandatory management statements defining security intent and scope.
  2. Standards: Mandatory technical baselines specifying exact controls/algorithms required to satisfy policies.
  3. Procedures: Mandatory step-by-step operational checklists for executing tasks consistently.
  4. Guidelines: Non-mandatory best-practice recommendations offering flexibility.

Explain MITRE ATT&CK's operational value: MITRE ATT&CK catalogs real-world adversary Tactics (14 attack goals from Reconnaissance to Impact) and Techniques/Sub-techniques (how attackers execute each goal). SOC teams map SIEM/EDR rules onto the matrix to uncover detection blind spots, while red teams emulate realistic APT TTP chains rather than isolated checks.

Answer:

SPF moves from high-level mandatory Policies technical Standards step-by-step Procedures advisory Guidelines. MITRE ATT&CK organizes adversary Tactics and Techniques so defenders identify detection gaps and red teams simulate realistic threats.

Question 4

Differentiate between White Hat, Gray Hat, and Black Hat hackers, and compare Coordinated (Responsible) Disclosure with Full Disclosure during vulnerability reporting.

Classify the three hacker roles:

  • White Hat: Authorized security testers working under written RoE or Bug Bounty rules to improve defense.
  • Gray Hat: Individuals probing systems without prior permission but without malicious extortion intent—still legally risky under unauthorized-access statutes.
  • Black Hat: Unauthorized attackers exploiting vulnerabilities for theft, espionage, sabotage, or ransom.

Compare Disclosure Models: In Coordinated Disclosure, the finder notifies the vendor privately and withholds public exploit details for an agreed embargo (typically ) so a patch ships before attackers weaponize the bug. In Full Disclosure, details are published immediately without waiting for a patch—pressuring slow vendors, but placing users at immediate risk of zero-day exploitation.

Answer:

White Hats operate with written permission, Black Hats attack maliciously, and Gray Hats probe without authorization (remaining legally exposed). Coordinated Disclosure grants vendors a private remediation window (e.g., ) prior to publication, whereas Full Disclosure releases flaws immediately.

Question 5

Summarize the role of Nepal's Electronic Transactions Act (ETA), 2063 in cyber security, naming three key cyber offenses defined in the Act and two practical enforcement challenges in Nepal.

Summarize ETA 2063 and three statutory cyber offenses: ETA 2063 gives legal recognition to electronic records and digital signatures (via licensed Certifying Authorities) and sets up the Information Technology Tribunal. Key offenses include:

  1. Section 44: Pirating, destroying, or altering computer source code that must be kept intact.
  2. Section 45: Unauthorized access to computer systems or materials.
  3. Section 46 / 52: Damaging computer/information systems, and computer fraud (for example fraud involving digital signature certificates, account balances or ATM cards).

State two practical challenges in Nepal:

  1. Outdated statutory scope and lack of a dedicated Data Protection Act: Fines/penalties written in 2006 and absence of comprehensive GDPR-style data protection rules leave gaps for modern cloud/AI privacy incidents.
  2. Cross-border jurisdiction and forensic capacity: Gathering evidence stored on foreign platforms requires slow MLAT processes, and specialized digital forensic resources remain concentrated centrally.
Answer:

ETA 2063 legalizes digital signatures/records and criminalizes source-code tampering (Sec. 44), unauthorized access (Sec. 45), system damage (Sec. 46), illegal online publication (Sec. 47), and computer fraud (Sec. 52). Key challenges include outdated statutory penalties without a dedicated Data Protection Act and cross-border evidence/forensic bottlenecks.

← Incident Response and Risk Management