Network attacks are malicious activities performed over a network to intercept, disrupt, or modify data communication between a client and server.
Session attacks are attacks that target a user’s session information (Session ID, cookies, tokens) to hijack or impersonate a legitimate user.
Network attacks target the communication channel between:
An attacker secretly intercepts communication between two parties.
Capturing data packets traveling over a network.
Attacker re-sends valid data packets to repeat unauthorized actions.
Overloading a server with traffic to make it unavailable.
Redirecting users to a fake website by modifying DNS records.
Session attacks target the session management system used in web applications.
👉 Sessions are used to maintain user login state.
Stealing a user's session ID to gain unauthorized access.
Attacker forces a user to use a predefined session ID.
Intercepting session cookies using insecure networks.
Forcing a logged-in user to perform unauthorized actions.
| Feature | Network Attacks 🌐 | Session Attacks 🔐 |
|---|---|---|
| Target | Communication channel | User session data |
| Focus | Data transfer | Authentication |
| Example | MITM, DoS | Hijacking, CSRF |
| Level | Network layer | Application layer |
User → Network → Server
↘ Attacker intercepts ↙
(Data / Session Theft)
✔ Use HTTPS (SSL/TLS encryption) ✔ Firewalls and intrusion detection systems ✔ Secure Wi-Fi networks ✔ Encryption of data packets
✔ Use strong session IDs
✔ Session expiration (timeout)
✔ Regenerate session ID after login
✔ Use secure cookies (HttpOnly, Secure)
✔ Implement CSRF tokens
✔ Network attacks target data transmission ✔ Session attacks target user authentication state ✔ HTTPS reduces network attacks ✔ Secure session management reduces session attacks
Network attacks → target communication (MITM, DoS, sniffing)
Session attacks → target user sessions (hijacking, fixation, CSRF)
Prevention:
👉 In short: Network attacks break communication security, while session attacks break user authentication security.
Open this section to load past papers