Malware & Attack Techniques MCQs for NSCT
Malware and attack techniques covers the ways attackers get into systems and what they do once inside: viruses, worms, Trojans and ransomware on the malware side, and phishing and denial of service (DoS) on the attack side. It is the seventh topic in the Cyber Security area, which carries 5% of the NSCT according to HEC's Areas of Competencies. Candidates averaged 47.2% accuracy in that area in 2026, per the HEC NSCT report and APP.
This page follows Stallings and Brown, Computer Security: Principles and Practice. It classifies malware (malicious software) in two ways: by how it propagates and by what its payload does. Most exam questions are really asking you to place a scenario in that grid. All descriptions here are conceptual; no working attack code is included.
| Malware | Spreads by | Needs a host file? | Typical payload |
|---|---|---|---|
| Virus | Infected programs or documents being run or shared | Yes | Anything |
| Worm | Exploiting network services by itself | No | Anything, often a backdoor or botnet agent |
| Trojan horse | The user installing a "useful" program | No (it is the program) | Backdoor, spyware |
| Rootkit | Installed after compromise | No | Hides the attacker, keeps root access |
| Logic bomb | Planted by an insider | Lives inside a program | Runs when a condition becomes true |
Viruses
A virus inserts its code into a host program, boot sector or document and runs when that host runs. Stallings lists four phases: dormant, propagation, triggering and execution. Its parts are the infection mechanism, the trigger and the payload.
Variants to know: - Macro virus: lives in documents and runs in the application's macro language, so it is largely independent of the operating system. - Polymorphic virus: re-encrypts itself with a new key and a mutated decryptor for each copy, so no fixed signature matches. - Metamorphic virus: rewrites its whole body each time, not just the decryptor.
Example: a spreadsheet with a macro that copies itself into every file the user opens next is a macro virus.
Exam angle: if the scenario says "attached to a file" or "the user opened a document", think virus.
Worms
A worm is a standalone program that finds and infects other machines over a network with no host file and no user action. Spread follows an S-shaped curve: a slow start, then fast growth, then a slow finish as uninfected vulnerable hosts run out.
Example: if infections double every 5 minutes from one host, after 30 minutes there are 2^6 = 64 infected hosts.
Exam angle: "spread to unpatched machines without anyone clicking" means worm, even if the payload is something else.
Ransomware
Ransomware encrypts the victim's files, or locks the system, and demands payment for the key. Many modern groups also steal data first and threaten to publish it, which is called double extortion. WannaCry (2017) combined a ransomware payload with worm-style spread through an SMB vulnerability.
The main defence is backups that the malware cannot reach: offline or immutable copies following the 3-2-1 rule (three copies, on two types of media, one off-site). If the last good backup ran at 01:00 and the attack hits at 13:00, you lose 12 hours of changes.
Exam angle: a backup share that is always mapped and writable is not a real backup against ransomware.
Phishing
Phishing is social engineering by message: a fake email or page from a trusted brand tricks the user into giving credentials or running malware.
| Variant | Channel or target |
|---|---|
| Spear phishing | One named person or a small group, with personal details |
| Whaling | Senior executives |
| Vishing | Voice calls |
| Smishing | SMS text messages |
| Pharming | Poisoned DNS or hosts file; the user types the correct URL and still lands on the fake site |
Example: 1,000 emails, a 5% click rate, and half of those clickers entering passwords gives 1,000 × 0.05 × 0.5 = 25 compromised accounts.
Exam angle: "typed the correct address" points to pharming, not phishing.
DoS
A denial-of-service attack attacks availability. A DDoS attack uses many sources, usually a botnet. Stallings groups the main forms as:
- Flooding: ICMP, UDP or TCP SYN floods that fill bandwidth or connection tables. SYN cookies let a server avoid storing state for half-open connections.
- Reflection and amplification: the attacker spoofs the victim's address in small requests to servers such as DNS resolvers, which send large replies to the victim. A 50-byte query that triggers a 2,500-byte reply amplifies traffic 50 times.
- Application-layer: HTTP floods or Slowloris-style slow requests that use up server slots with very little bandwidth.
Source-address filtering at network edges (RFC 2827, BCP 38) stops spoofed packets leaving a network.
Exam angle: if the link is saturated, filtering has to happen upstream at the ISP or a scrubbing service.
Common traps
- Calling any self-spreading malware a virus. If it needs no host file and no user action, it is a worm.
- Thinking a Trojan replicates itself. It spreads only because users install it.
- Confusing polymorphic (new encryption each copy) with metamorphic (whole body rewritten).
- Answering "confidentiality" for DoS. DoS hits availability.
- Treating pharming as phishing. Pharming needs no lure because name resolution itself is poisoned.
- Expecting antivirus to stop business email compromise. A request with no link and no attachment needs a process control, such as out-of-band verification.
Worked examples
1. Understanding. A USB stick contains a program called "WiFi Password Viewer". When run, it shows nothing useful but installs remote-access software. What is it? Answer: a Trojan horse. It pretends to be useful and relies on the user to run it. It does not copy itself to other machines, so it is not a worm or virus.
2. Application. A DNS resolver returns 4,000 bytes for an 80-byte spoofed query. An attacker can send 100 Mbps of queries. How much traffic reaches the victim? Answer: 5 Gbps. The amplification factor is 4,000 / 80 = 50, and 100 Mbps × 50 = 5,000 Mbps = 5 Gbps.
3. Analysis. An outbreak spreads to every unpatched server on a campus overnight, with no emails sent and nobody opening files. Affected servers then join a C2 channel and later flood an external site. Which two terms describe what happened? Answer: a worm that built a botnet used for DDoS. Spreading through a network vulnerability without user action is worm behaviour. Taking commands from a C2 server makes the hosts bots, and flooding a target together is a DDoS attack.
Practise
The quiz below has 100 questions on this topic, filterable by tier and difficulty.
Practise: 100 questions
FAQs
What is the difference between a virus, a worm and a Trojan?
A virus attaches to a host program or document and spreads when that host is run or shared. A worm is a standalone program that spreads over the network by itself. A Trojan pretends to be useful software and relies on the user to install it. They differ in how they spread; any of them can carry any payload.
Is ransomware a virus?
Not necessarily. Ransomware describes the payload: encrypting files and demanding payment. It can arrive by phishing attachment, by a Trojan installer or by worm-style spread, as WannaCry did. In exam answers, classify the propagation and the payload separately, then pick the option that matches both.
Is NSCT cyber security hard?
In 2026 candidates averaged 47.2% in the Cyber Security area, close to the middle of the ten areas, per the HEC report. Attack questions mostly test classification: matching a scenario to the right malware or attack name. Learn the propagation-versus-payload grid and the phishing variants, and many questions become quick.
Next step
Continue with Authentication & Access Control MCQs. For related defences, see Network Security and Web Application Security. Browse all topics on the Cyber Security hub, then take an NSCT mock test.