Skip to content

Cookies on Jobverse

We use cookies that are needed to sign you in and keep the site working. With your permission we’d also use an analytics cookie to count job views, and Google advertising cookies to show ads. The site works the same whatever you choose. Read the Cookie Policy.

Jobverse
Sign in

Cybersecurity Engineer Top 100 Interview Questions

100 cybersecurity engineer interview questions with structured answers, comparison tables, flow diagrams, worked calculations and runnable code. Covers security fundamentals, cryptography, network and application security, identity, detection, incident response and vulnerability management, from the basics to design and scenario questions.

100 questions

Questions 81-100 of 100

  1. Q81.How is endpoint detection and response different from traditional antivirus?

    Traditional antivirus mainly blocks known malicious files by matching signatures. Endpoint detection and response records detailed activity on each device, detects suspicious behavior, and gives responders tools to investigate and act remotely.

    Traditional antivirusEndpoint detection and response
    Detects known file signatures, with some heuristicsDetects behavior, signatures and analytics
    Records little beyond detectionsRecords process, file, network and registry activity
    Largely misses attacks without filesDetects attacks without files through behavior
    Limited investigationFull timeline and process tree per device
    Responds by quarantining a fileResponds by isolating a host, killing processes, collecting files, running scripts
    Low operating effortNeeds analysts to review alerts

    When each fits:

    • Antivirus is still a useful baseline layer that stops known commodity malware cheaply.
    • Detection and response tools are expected wherever a security team investigates incidents, because they answer "what happened on this machine?" in minutes.
    • Their value depends on people and process: unmonitored alerts protect nothing, so many smaller organizations use a managed detection service.
  2. Q82.What are the main types of malware?

    Malware is classified by how it spreads and what it does once installed. Real samples often combine several types, such as a trojan that installs ransomware.

    VirusWormTrojanRansomware
    Attaches to legitimate files and runs when they runSpreads on its own across networks via vulnerabilitiesPoses as legitimate softwareEncrypts files and demands payment, often after stealing data
    Corrupts files, spreads through sharingRapid, wide infectionOpens a back door for other toolsOutage and extortion
    Information stealerRootkitBotnet agentFileless malware
    Harvests passwords, cookies and session tokensHides itself and other malware deep in the systemJoins a remotely controlled network of devicesRuns in memory using built-in system tools
    Leads to account takeoverGives long-term, hidden controlUsed for floods, spam and further attacksEvades file-based scanning

    Defensive takeaways:

    • Behavior-based endpoint detection matters because file signatures miss fileless and newly changed samples.
    • Information stealers are now a common first step: stolen session cookies can bypass multi-factor authentication, so short session lifetimes and device binding matter.
    • Patch quickly to stop worms, and restrict who can install software to stop trojans.
    • Back up data to immutable storage, so ransomware cannot also destroy the way back.
  3. Q83.How do you analyze a suspicious email?

    Check who really sent it, where its links and attachments lead, and whether anyone else received or clicked it, without opening anything on your own workstation.

    1. Read the headers: compare the visible sender with the actual sending domain and the Reply-To address, and trace the receiving servers.
    2. Check authentication results: SPF says whether the sending server was allowed to send for the domain, DKIM proves the message was signed by the domain, and DMARC says whether those match the visible From domain.
    3. Inspect links without clicking: look at the real destination behind each link, the domain's age and reputation, and any redirects. Open it only in an isolated sandbox.
    4. Inspect attachments safely: get the file hash, check reputation, and run it in a sandbox. HTML attachments, archives and documents with macros are red flags.
    5. Judge the content: urgency, payment changes, credential requests and unusual tone.
    6. Scope: search the mail system for other recipients, and the proxy logs for anyone who visited the link.
    7. Respond: remove the message from all mailboxes, block the sender and domains, and reset credentials for anyone who submitted them.

    Passing SPF, DKIM and DMARC proves only that the email came from the domain it claims. Attackers register look-alike domains and authenticate them perfectly.

    Example

    Headers from a reported "updated bank details" email:

    From: Accounts Team <billing@harbor-part5.example>
    Reply-To: payments.harborparts@freemail.example
    Authentication-Results: spf=pass smtp.mailfrom=harbor-part5.example;
      dkim=pass header.d=harbor-part5.example; dmarc=pass header.from=harbor-part5.example
    Received: from mail.harbor-part5.example (203.0.113.25)

    What the analysis found:

    1. All three checks pass, but for harbor-part5.example, a look-alike of the real supplier harbor-parts.example, with the letter "s" replaced by "5".
    2. The look-alike domain was registered six days earlier.
    3. Replies go to a free webmail address, not to the supplier.
    4. The message asks for future payments to go to a new bank account, a classic business email compromise.

    The finance team confirmed by phone, using the number on file, that the supplier had sent nothing. The domain was blocked and the email removed from the other 3 recipients.

  4. Q84.How would you detect lateral movement inside a network?

    Lateral movement uses valid credentials and built-in admin tools, so it is detected by unusual relationships, such as who logs in where, from where and how, rather than by malware signatures.

    One account logging in to many hosts in minutesWorkstation-to-workstation admin connectionsRemote service or scheduled task creation on servers
    Automated spreading with stolen credentialsNormal admin work goes from managed admin hosts to serversA common way to run tools on a remote host
    Admin account use from a host it has never usedAccess to credential stores or memory of login processesNew remote desktop or remote shell sessions at odd hours
    Credentials used away from their normal sourceHarvesting more credentials to move furtherHands-on-keyboard activity

    What makes detection possible:

    • Baselines of normal authentication paths per account and host group.
    • Rich telemetry: authentication logs from servers and the directory, plus process and network data from endpoints.
    • Deception: decoy accounts and credentials planted on hosts that should never be used. Any use of them is a high-confidence alert.

    Prevention reduces the noise too. If admin accounts can log in only from dedicated admin workstations, any other source stands out immediately.

    Example

    How a burst of activity was caught one evening:

    1. At 19:42 a help-desk account authenticated to 37 servers in 6 minutes. Its normal pattern was about 5 logins a day to workstations.
    2. The source was a marketing laptop, which had never been used for admin logins.
    3. On 12 of those servers, a new service was created within a minute of the login, running a binary from a temporary folder.
    4. The laptop showed a phishing attachment opened at 18:55, followed by a memory dump of the login process, which is how the help-desk credentials were taken.

    The account was disabled, the laptop and 12 servers were isolated, and the attack stopped before any data left the network.

  5. Q85.Write a script that finds IP addresses with repeated failed logins in an authentication log.

    Parse each log line into a timestamp, outcome, user and source address, keep a sliding time window of failures per source, and alert when a source crosses a threshold. Also flag a success that follows several failures, which may mean the attacker got in.

    Key points:

    • Use a time window, not a total count: 5 failures in a minute is suspicious, 5 in a month is not.
    • Count distinct usernames per source to tell password spraying, which tries many accounts, from someone mistyping their own password.
    • Alert on success after failures, the most important outcome to catch.
    • Parse strictly with a regular expression and skip lines that do not match, rather than guessing at fields.
    • Process in time order; logs merged from several servers may arrive out of order.
    • Slow attacks that stay under the threshold need a second, longer window, such as failures per source per day.

    In production, the same logic usually runs as a rule in the log platform. Writing it once by hand shows exactly what the rule must do.

    Example

    A sliding-window detector over a small sample log:

    import re
    from collections import defaultdict, deque
    from datetime import datetime, timedelta
    
    LOG = """\
    2026-03-02T10:00:01Z login failure user=admin src=203.0.113.9
    2026-03-02T10:00:03Z login failure user=root src=203.0.113.9
    2026-03-02T10:00:05Z login failure user=test src=203.0.113.9
    2026-03-02T10:00:06Z login failure user=backup src=203.0.113.9
    2026-03-02T10:00:09Z login failure user=deploy src=203.0.113.9
    2026-03-02T10:00:12Z login failure user=maria src=198.51.100.20
    2026-03-02T10:00:15Z login success user=maria src=198.51.100.20
    2026-03-02T10:01:00Z login failure user=sam src=192.0.2.44
    2026-03-02T10:02:00Z login failure user=lee src=203.0.113.77
    2026-03-02T10:02:05Z login failure user=lee src=203.0.113.77
    2026-03-02T10:02:09Z login failure user=lee src=203.0.113.77
    2026-03-02T10:02:14Z login failure user=lee src=203.0.113.77
    2026-03-02T10:02:20Z login success user=lee src=203.0.113.77
    2026-03-02T10:03:30Z login failure user=sam src=192.0.2.44
    """
    LINE = re.compile(r"^(\S+) login (failure|success) user=(\S+) src=(\S+)$")
    WINDOW = timedelta(minutes=1)
    THRESHOLD = 5
    
    recent = defaultdict(deque)  # source -> failure times inside the window
    users = defaultdict(set)  # source -> usernames it has tried
    alerts = []
    for line in sorted(LOG.splitlines()):
        match = LINE.match(line)
        if not match:
            continue
        stamp, outcome, user, source = match.groups()
        when = datetime.fromisoformat(stamp.replace("Z", "+00:00"))
        window = recent[source]
        while window and when - window[0] > WINDOW:
            window.popleft()
        if outcome == "failure":
            window.append(when)
            users[source].add(user)
            if len(window) == THRESHOLD:
                alerts.append(f"{stamp} {source}: {THRESHOLD} failures in 1 minute, {len(users[source])} usernames")
        elif len(window) >= 3:
            alerts.append(f"{stamp} {source}: success for {user} after {len(window)} recent failures")
    
    for alert in alerts:
        print(alert)
    # Output:
    # 2026-03-02T10:00:09Z 203.0.113.9: 5 failures in 1 minute, 5 usernames
    # 2026-03-02T10:02:20Z 203.0.113.77: success for lee after 4 recent failures

    The single typo from 198.51.100.20 and the slow failures from 192.0.2.44 stay quiet. The second alert is the urgent one: a password was guessed or reused successfully.

  6. Q86.What is threat hunting, and how does it differ from alert-driven monitoring?

    Threat hunting is a proactive search for attackers who have not triggered any alert, starting from a hypothesis about how they might operate. Alert-driven monitoring waits for rules to fire; hunting assumes some attacks slip past those rules.

    Alert-driven monitoringThreat hunting
    Starts when a rule firesStarts from a hypothesis or new intelligence
    Asks: is this alert real?Asks: is this technique happening here undetected?
    Triage and respondExplore data, look for rare and anomalous activity
    Produces closed or escalated alertsProduces found intrusions, new detections, visibility gaps
    Needs playbooks and speedNeeds deep knowledge of systems and attacker techniques

    A good hunt cycle:

    1. Form a hypothesis from intelligence or a known gap, such as "attackers use scheduled tasks for persistence".
    2. Gather the data needed to test it, over a meaningful period.
    3. Analyze by grouping and stacking: rare values across the fleet are more interesting than common ones.
    4. Investigate the outliers until each is explained.
    5. Turn results into automation: every successful hunt should leave behind a new or improved detection rule.

    Hunting also reveals missing logs. Finding that you cannot test a hypothesis is itself a valuable result.

    Example

    A persistence hunt over 30 days of endpoint data:

    1. Hypothesis: an attacker has created scheduled tasks that run programs from user-writable folders.
    2. Data: 412 scheduled tasks were created across 2,300 hosts in the period.
    3. Stacking: 409 tasks matched software installed on more than 50 hosts each, such as updaters and backup agents. Three tasks appeared on only one host each.
    4. Investigation: two were a developer's legitimate test jobs. The third ran an unsigned file from a temporary folder every 15 minutes and connected to a domain registered last week.
    5. Outcome: the host was isolated and investigated, and a new rule now alerts on tasks that run unsigned binaries from temporary folders.
  7. Q87.How do you write and test a new detection rule?

    Start from a specific attacker behavior, confirm you have the data to see it, write the rule, then test it against both malicious and normal activity before it reaches analysts.

    flowchart LR
      A["Pick a behavior to detect"] --> B["Confirm the logs exist"]
      B --> C["Write the rule"]
      C --> D["Test on simulated attacks"]
      D --> E["Test on historical normal data"]
      E --> F{"Precise enough?"}
      F -->|no| C
      F -->|yes| G["Deploy with a triage playbook"]
      G --> H["Track alert outcomes"]
    1. Define the behavior precisely, such as "a user granted admin rights outside an approved change".
    2. Check data availability: which log records it, with which fields, and how quickly it arrives.
    3. Write the rule with clear logic and comments explaining why it exists.
    4. Test true positives by simulating the behavior in a test environment.
    5. Test against history, running the rule over weeks of past data to estimate alert volume.
    6. Write unit tests with sample events, so future changes cannot silently break the rule.
    7. Ship it with a playbook that tells the analyst what to check and what to do.

    Store rules in version control with reviews, like code. Detection rules break when log formats change, and tests catch that.

    Example

    A rule for admin rights granted without an approved change, with tests that document its behavior:

    APPROVED_CHANGES = {"CHG-1042", "CHG-1043"}
    
    
    def admin_grant_without_change(event: dict) -> bool:
        """Alert when admin rights are granted without an approved change record."""
        return event.get("action") == "admin_role_granted" and event.get("change_id") not in APPROVED_CHANGES
    
    
    TESTS = [
        ("grant with no change record", {"action": "admin_role_granted", "actor": "j.doe"}, True),
        ("grant under an approved change", {"action": "admin_role_granted", "change_id": "CHG-1042"}, False),
        ("grant citing an unapproved change", {"action": "admin_role_granted", "change_id": "CHG-9999"}, True),
        ("unrelated action", {"action": "password_reset", "actor": "j.doe"}, False),
        ("event missing its action field", {"actor": "j.doe"}, False),
    ]
    for name, event, expected in TESTS:
        result = admin_grant_without_change(event)
        print(f"{'PASS' if result == expected else 'FAIL'}  {name}")
    # Output:
    # PASS  grant with no change record
    # PASS  grant under an approved change
    # PASS  grant citing an unapproved change
    # PASS  unrelated action
    # PASS  event missing its action field

    The last test records a deliberate decision: malformed events do not alert here, so a separate health check must alert when a log source starts sending events without the expected fields.

  8. Q88.What are the types of threat intelligence, and who uses each one?

    Threat intelligence is usually split into four types by its time horizon and audience: from long-term trends for leaders to machine-readable indicators for blocking tools.

    StrategicOperationalTacticalTechnical
    Trends, attacker motives, business riskSpecific campaigns and their timingAttacker techniques and proceduresIndicators such as hashes, domains and addresses
    Used by executives and risk ownersUsed by incident responders and huntersUsed by detection engineers and the security operations centerUsed by automated blocking and enrichment
    Ransomware groups increasingly target our sectorA campaign is phishing logistics firms with fake customs noticesThis group steals browser cookies to bypass multi-factor authenticationA list of command servers for one malware family

    What makes intelligence useful:

    • Relevant: it concerns attackers who actually target your sector, regions and technologies.
    • Timely: technical indicators lose value within days or weeks as attackers change infrastructure.
    • Actionable: each report should lead to a decision, a detection, a hunt or a block.

    Feeding thousands of generic indicators into a firewall creates false positives without much protection. Tactical intelligence about techniques usually improves detection more than raw indicator lists do.

  9. Q89.What are the phases of incident response?

    Incident response follows a cycle: prepare before anything happens, detect and analyze, contain the damage, remove the cause, recover, and learn. Containment, eradication and recovery often repeat as the investigation finds more.

    flowchart LR
      A["Preparation"] --> B["Detection and analysis"]
      B --> C["Containment"]
      C --> D["Eradication"]
      D --> E["Recovery"]
      E --> F["Post-incident review"]
      C -->|new findings| B
      F -->|improvements| A
    1. Preparation: plans, playbooks, contacts, logging, tools, trained people and practice exercises.
    2. Detection and analysis: confirm the incident, judge its severity, and work out scope and timeline.
    3. Containment: stop the spread by isolating hosts, disabling accounts and blocking indicators, while preserving evidence.
    4. Eradication: remove malware, persistence and attacker access, and fix the vulnerability that let them in.
    5. Recovery: restore systems from clean sources, monitor closely, and return to normal operations in stages.
    6. Post-incident review: a blameless review of what happened, what worked, and the improvements to make.

    Running it well: name one incident lead, keep a timestamped log of actions, communicate on a regular schedule, and involve legal and communications early when data or customers are affected.

    Interview tip: stress that preparation is a phase; most response failures trace back to missing logs, unclear authority or untested backups, all of which are fixed before an incident.

  10. Q90.How would you contain a ransomware outbreak?

    Contain ransomware by cutting its paths to spread, protecting backups and identity systems first, and preserving evidence, all while the scope is still being worked out.

    1. Isolate affected hosts with endpoint tools or network controls. Keep them powered on if possible, since memory may hold keys and evidence.
    2. Protect the backups: disconnect or lock backup systems and confirm that immutable copies are intact.
    3. Stop lateral movement: block remote administration protocols between workstations, and segment critical servers.
    4. Contain identity: reset passwords of compromised accounts, especially admins and service accounts. Invalidate sessions and tokens too, since attackers often hold them.
    5. Block attacker infrastructure: command servers, file-sharing sites and tools seen in the attack.
    6. Find the scope and entry point: which accounts and hosts were used, and whether data was stolen before encryption.
    7. Engage the right people: leadership, legal, insurers, and law enforcement where appropriate. Use an out-of-band channel if email or chat may be compromised.

    Containment is a trade-off between speed and disruption. Pulling the internet connection stops the spread quickly but also stops the business, so decide in advance who has the authority to do it.

    Example

    The first two hours of a real-world style response:

    1. 00:00 Endpoint alerts show files being renamed with a new extension on 9 file servers.
    2. 00:10 The response lead isolates those 9 servers and the 3 workstations that connected to them. Backup operators confirm the immutable backup store has not been touched and disable its admin logins.
    3. 00:25 Logs show a domain admin account used from a workstation at 23:40. Its password is reset twice in a row and all its sessions are revoked.
    4. 00:45 Remote administration between workstations is blocked by policy across the network, and two attacker domains are blocked at the egress proxy.
    5. 01:30 Investigation finds that data was uploaded to a file-sharing service before encryption, so legal and privacy teams start their assessment of notification duties.
    6. 02:00 Spread has stopped. Recovery planning begins from backups taken before the attacker's first login, 11 days earlier.
  11. Q91.What is the order of volatility in digital forensics?

    The order of volatility tells investigators to collect the most short-lived evidence first, because it disappears soonest. Memory and network state vanish on reboot, while disks and backups last much longer.

    1. CPU registers and cache2. Memory3. Temporary file systems and swap space
    Lasts nanosecondsLasts until shutdown or overwrite; holds processes, network connections, keys and logged-in usersLasts until reboot or reuse
    4. Disk contents5. Remote logs and monitoring data6. Archives and backups
    Lasts until deleted or overwrittenLasts until retention expiresLasts months to years

    Practical consequences:

    • Do not switch off a compromised machine by reflex. Capture memory first when the incident justifies it, because fileless malware and encryption keys may exist only there.
    • Record everything you do, since every action on a live system changes it a little.
    • Image disks with write protection and hash the images, then analyze copies, never the originals.
    • Secure remote logs early; attackers often delete local logs, and retention limits erase central ones over time.
  12. Q92.What is chain of custody, and why does it matter?

    Chain of custody is the documented record of who collected each piece of evidence, how, when, where it was stored and everyone who handled it afterwards. It proves the evidence presented later is exactly what was collected and has not been altered.

    What a good chain of custody includes:

    • Identification: what the item is, such as a laptop serial number or a disk image file name.
    • Collection details: who collected it, when, where and with which tool.
    • Integrity proof: a cryptographic hash taken at collection and checked again at every transfer.
    • Secure storage: sealed, labeled evidence bags for devices, and access-controlled storage for images.
    • A transfer log: every hand-off, signed and timestamped, with the reason.
    • Working copies: analysis is done on verified copies; the original stays untouched.

    Why it matters:

    • Evidence with gaps in its record may be rejected in court or in disciplinary hearings.
    • Insurers, regulators and law enforcement may rely on the findings.
    • It protects investigators from claims that they planted or changed evidence.

    Treat any serious incident as if it could end up in court. Adding a proper chain of custody afterwards is impossible.

  13. Q93.An employee's credentials were phished. What do you do?

    Assume the attacker has already used them: lock the account down, remove every session and access path the attacker may have created, then check what they did with it.

    1. Reset the password and require re-enrollment of multi-factor authentication if the method may have been captured.
    2. Revoke all sessions and tokens, including refresh tokens and app passwords; a password reset alone does not end an existing session.
    3. Look for persistence: new multi-factor devices, mailbox forwarding rules, app consents, API keys and recovery addresses added by the attacker.
    4. Review activity since the phishing time: sign-ins, locations, file downloads, emails sent and admin actions.
    5. Scope the campaign: find other recipients, block the phishing domain, and check proxy logs for other users who submitted credentials.
    6. Contain onward abuse: if the account sent phishing internally or to customers, warn them and remove those messages.
    7. Learn: move the user, and ideally everyone, to phishing-resistant authentication.
    flowchart TD
      A["Credential phish reported"] --> B["Reset password and revoke sessions"]
      B --> C["Remove attacker persistence"]
      C --> D["Review account activity"]
      D --> E{"Signs of misuse?"}
      E -->|no| F["Close with user follow-up"]
      E -->|yes| G["Escalate to full incident response"]
      G --> H["Notify affected parties"]

    Example

    What a review of a phished mailbox found:

    1. The user entered credentials and an authenticator code on a fake sign-in page at 09:12. The attacker signed in from another country at 09:13.
    2. At 09:20 the attacker added a mailbox rule that moved any email containing "invoice" or "payment" into a hidden folder.
    3. At 09:31 the attacker registered a new authenticator device on the account.
    4. Between 10:00 and 10:40, 220 phishing emails went to the user's external contacts.

    The response reset the password, revoked sessions, removed the rule and the rogue device, and recalled the messages. Every contact was warned, and the user was moved to a hardware security key.

  14. Q94.How should backups be designed to survive a ransomware attack?

    Ransomware groups deliberately find and destroy backups before encrypting anything else. Backups must therefore be isolated from the production environment, impossible to change for a set period, and proven to restore quickly.

    • Keep multiple copies: at least three copies of data, on two kinds of storage, with one off-site. Make at least one copy immutable or offline.
    • Make them immutable: object locking or write-once storage that even an administrator cannot delete before the retention period ends.
    • Separate identity: backup systems use their own accounts and multi-factor authentication, not the main directory, so stolen domain admin credentials cannot reach them.
    • Retain long enough: attackers often wait weeks before encrypting, so keep restore points older than the likely dwell time.
    • Protect the backup configuration itself, and alert on retention changes and mass deletions.
    • Test restores regularly, including a full rebuild of a critical system, and measure how long it takes.
    • Back up what recovery needs: identity services, configuration and infrastructure code, not only data.

    A backup that has never been restored is a hope, not a plan.

    Example

    Why retention length decided one recovery:

    1. The attacker first logged in 21 days before encrypting the network, and planted a back door in the file servers on day 3.
    2. Nightly backups were kept for 14 days, so every available restore point already contained the back door.
    3. The team had to restore 14-day-old data and then hunt for and remove the back door on each server, which added a week to the recovery.
    4. After the incident, immutable retention moved to 35 days for daily copies plus 12 monthly copies, which gives clean restore points that predate typical dwell times.
  15. Q95.How do you measure the effectiveness of a security program?

    Measure outcomes and speed, not activity: how quickly threats are found and fixed, how much of the environment is covered, and whether risk is going down over time. A count of blocked attacks or completed trainings says little on its own.

    Mean time to detectMean time to respondPatch time for critical flawsCoverage
    How long attackers operate before being noticedHow quickly incidents are containedThe exposure window on known vulnerabilitiesShare of assets with endpoint protection, logging and scanning
    Phishing report rateMulti-factor authentication adoptionDetection coverage
    Whether staff report suspicious emails, not just whether they clickShare of accounts protected, especially adminsShare of simulated attack techniques that raise an alert

    How to use metrics well:

    • Track trends over quarters rather than single values.
    • Use medians for time-based measures, since one long incident distorts an average.
    • Tie metrics to risk: a quarterly report should show which top risks were reduced, not only which numbers moved.
    • Beware incentives: if teams are judged on ticket counts, they will close tickets rather than fix problems.

    Example

    Calculating detection and response times for one quarter's five confirmed incidents:

    1. Hours from attacker activity to detection: 2, 5, 9, 30 and 300. The median is 9 hours; the mean is 69.2 hours because of one slow detection.
    2. Hours from detection to containment: 1, 1.5, 2, 4 and 6. The median is 2 hours.
    3. The 300-hour case was a compromised cloud account with no audit log alerts, so the next quarter's priority is cloud audit coverage, not faster containment.

    The median shows typical performance, while the outlier shows exactly where the program has a gap.

  16. Q96.How do you prevent and detect misconfigured cloud storage that exposes data?

    Prevent public exposure with account-wide guardrails and secure defaults, then detect the remaining mistakes quickly with continuous configuration checks and access monitoring.

    Prevention:

    1. Block public access at the account or organization level, so a single bucket policy cannot make data public by accident.
    2. Deploy storage through infrastructure code with policy checks in the pipeline that reject public or unencrypted configurations.
    3. Use least-privilege access policies tied to roles, and avoid long-lived share links and wildcard principals.
    4. Encrypt by default and turn on versioning and access logging for sensitive buckets.
    5. Tag data with its classification, so stricter rules apply to sensitive stores automatically.

    Detection:

    • Posture management scans that flag public, unencrypted or unlogged storage within minutes.
    • Alerts on policy changes, especially a change to public access or cross-account sharing.
    • Access log analysis for unusual readers, large downloads or anonymous requests.
    • External checks that look for your storage from the internet, as an attacker would.

    When exposure is found, remove the public access first, then use the access logs to see whether anyone read the data, which decides whether it is a breach.

  17. Q97.How do you harden a server before it goes into production?

    Hardening reduces a server to what it needs, secures what remains, and makes sure you will see what happens on it. Build the hardened state into an image and configuration code, so every server starts secure rather than being fixed by hand.

    1. Start minimal: a minimal operating system install, with unused packages, services and features removed.
    2. Patch fully before exposure, and enroll the server in automated patching.
    3. Secure access: key-based remote login only, no direct root or administrator login, multi-factor authentication through a bastion or access proxy, and no shared accounts.
    4. Remove defaults: default accounts, passwords, sample applications and verbose banners.
    5. Restrict the network: a host firewall that allows only required ports and sources.
    6. Run services with least privilege, each under its own account with only the file access it needs.
    7. Apply a configuration baseline from a recognized hardening benchmark, and scan against it.
    8. Enable logging and monitoring: send logs to the central platform, install the endpoint detection agent and sync time so timelines line up.
    9. Encrypt disks and protect secrets with a secrets manager, never in local files.
    10. Verify before go-live with a vulnerability scan and a configuration compliance check.

    Immutable servers go further: they are never changed in place but replaced with a new hardened image. Configuration drift then has nowhere to accumulate.

  18. Q98.Design the security architecture for a new customer-facing web application.

    Design it as layers around the data: protected entry points, strong identity, an application that enforces authorization on every request, private and encrypted data stores, and monitoring across all of them.

    flowchart LR
      A["Users"] --> B["Edge: content delivery, web firewall, denial-of-service protection"]
      B --> C["Load balancer with TLS"]
      C --> D["Web and API tier in private subnets"]
      D --> E["Database, encrypted and private"]
      D --> F["Secrets manager"]
      G["Identity provider with multi-factor authentication"] --> D
      D --> H["Central logging and alerting"]
      I["Pipeline with code, dependency and secret scans"] --> D

    Key decisions:

    • Identity: a standard sign-in protocol with an identity provider, multi-factor authentication, secure session cookies and protected account recovery.
    • Authorization: checks on every request against the object being accessed, enforced in a shared component.
    • Input and output: schema validation on input, parameterized queries and context-aware output encoding.
    • Data protection: TLS everywhere, encryption at rest with managed keys, and minimal collection of personal data.
    • Network: only the edge is public; application and data tiers live on private networks with strict rules.
    • Secrets: fetched at runtime from a secrets manager by workload identity, never stored in code.
    • Operations: central logs, alerts on authentication and data access anomalies, and a tested incident plan.

    Trade-offs: stricter controls add latency and development effort, so put the strongest controls around the most sensitive data and actions.

    Example

    How the design handles a password-reuse attack against the new application:

    1. An attacker replays 50,000 leaked username and password pairs from many addresses.
    2. The web firewall's bot rules and per-account rate limits slow the attack, and the login failure alert fires within 3 minutes.
    3. 41 pairs are correct, but multi-factor authentication stops all 41 logins. Each account owner is told about the attempt and asked to change their password.
    4. Because the attack never reaches a valid session, the authorization layer, database encryption and data access alerts are never tested. They remain in place for the attack that eventually gets further.
  19. Q99.How should you explain a security project you personally worked on?

    Tell it as a short story with a clear structure: the risk, what you did and why, what changed, and what you learned. Make your own contribution clear, and give numbers wherever you can.

    1. Context: the system, the business, and the risk or incident that started the project.
    2. Your role: what you personally owned, as distinct from the team's work.
    3. The problem: what made it hard, such as legacy systems, conflicting priorities or limited budget.
    4. Your decisions: the options you considered, the trade-offs, and why you chose your approach.
    5. The result: measurable outcomes, such as "phishing-related account takeovers fell from six a quarter to zero" or "critical patch time dropped from 30 days to 5".
    6. Lessons: what you would do differently, and what the team does differently now.

    What the interviewer is listening for:

    • Whether you understand why the work mattered to the business, not just which tools you used.
    • Whether you can weigh security against usability, cost and delivery.
    • Honesty about mistakes and limits, which signals maturity.
    • Whether you can explain technical points simply.

    Prepare two or three stories in advance, such as an incident, a hardening or detection project, and a time you influenced other teams. Practise telling each in about three minutes.

  20. Q100.How do you handle a disagreement when a business owner wants to accept a risk you consider serious?

    Make sure the owner truly understands the risk in business terms, offer practical options that reduce it, and if they still accept it, document the decision properly rather than blocking or quietly giving up.

    1. Understand their goal: what deadline, revenue or customer need is driving the decision.
    2. Explain the risk in their language: likely scenarios, impact on customers and revenue, and regulatory exposure, rather than technical severity scores.
    3. Offer options, not a veto: a compensating control, a phased fix, a smaller launch, or extra monitoring until the fix ships.
    4. Agree on facts: where you disagree, test assumptions together, such as whether the system really is unreachable from the internet.
    5. Escalate through governance if the risk exceeds what this owner may accept, rather than going around them.
    6. Document the acceptance: the named owner, the reasoning, conditions and an expiry date for review.
    7. Follow up: check that the agreed controls are delivered, and revisit when the date arrives.

    What the interviewer is listening for:

    • That you see security as enabling the business, and the risk decision as belonging to the business owner.
    • Influence without authority, and calm communication under pressure.
    • That you hold firm on facts and process, not on personal preference.