@Lna: good to know, then we can discuss freely.
The answer is: it depends on the attack. Usually attack models are not included in ns-3 as, like Jack said, ns-3 is more focused on the "right" behavior. However, it is fairly simple (let's say, very easy), to simulate:
- Sybil attack (very easy, you can force MAC addresses on a NetDevice, or install thousands of NetDevices in a node)
- Replay attacks
- Black / Gray hole attacks
- Wormhole attacks (selective or blanket)
- Packet reordering attacks
- ARP/NDP spoofing
- TCP reset
and the list is only about the ones I could implement in less than half an hour (mileage might vary, I know where to change the code).
What cannot be done so easily are attacks to the authentication protocols or to the crypto, as authentication mechanisms are not implemented, and crypto can be implemented, but it's usually not used.
In the contrary, appropriate countermeasures to attack are **very** tricky to implement. Not because they're hard to implement (they're not that hard), but because the researchers are tempted to access internal states that are not known for real. E.g., suppose you want to know how many packets a node has forwarded (it's often used as a very questionable approach to mitigate attacks to routing). In ns-3 you can "inspect" a neighbor node to get such a value - but in a real system you can't. Hence, in ns-3 you can implement a "all-knowing" method, which is - of course - not feasible in a real system.
Summarizing:
- What are the attacks that are implemented in ns-3? None in the "main" ns-3 repository.
- What are the attacks that can be easily implemented in ns-3? Any attack involving routing, protocols message thwarting, L3/L4 attacks, and even (sorry, forgot to add to the list) Jamming attacks.
- What is extremely hard or next-to-impossible to implement? DoS and DDoS (actually any resource exhaustion attack).
On Friday 29 March 2024 at 20:41:02 UTC+1 Ina wrote:
thank you for the response. my tutor can read without problem since it is a chapter dedicated to existing NS3 attacks. i.e. already implemented. if there are any other tips that will be useful to me.