Security Analysis
Analysis.
A beginner asks:
“Which tool should I run?”
A professional asks:
“What does this evidence tell me, what does it mean, and what should I test next?”
1. What Is Security Analysis?
Security analysis is the process of turning raw technical information into a security conclusion.
For example:
Nmap Output ↓ Port 445 open ↓ SMB service detected ↓ Version identified ↓ Configuration analyzed ↓ Potential weakness ↓ Manual validation ↓ Impact determined ↓ Finding
The important part is everything between:
“I found something”
and
“I can prove this is a security issue.”
2. Analysis Is Everywhere
You will analyze:
Recon data DNS records Nmap results HTTP responses Burp requests Web traffic Wi-Fi packets Logs Source code Credentials AD relationships Cloud permissions Container configurations Malware behavior Vulnerability scanner results
3. The Core Analysis Cycle
Use this everywhere:
OBSERVE ↓ UNDERSTAND ↓ CORRELATE ↓ FORM HYPOTHESIS ↓ TEST ↓ VALIDATE ↓ ASSESS IMPACT ↓ DOCUMENT
This is much better than randomly attacking systems.
4. Observation vs Conclusion
This distinction is extremely important.
Observation
Port 22 is open.
Conclusion
SSH is potentially accessible.
Stronger conclusion
SSH is reachable from the tested network and uses password authentication.
Vulnerability conclusion
Only after validation:
SSH permits an unauthorized authentication path.
Don't jump from:
Open port
to:
Vulnerable system
5. Evidence-Based Thinking
A professional finding should be supported by evidence.
Example:
Observation: API endpoint returns another user's data. Evidence: Request + response. Analysis: Server appears to authorize based on object ID rather than the authenticated user's ownership. Validation: Repeat using a second authorized test account. Impact: User A can access User B's information. Finding: Broken Object Level Authorization.
6. Analyze Nmap Results
Suppose:
22/tcp open ssh 80/tcp open http 443/tcp open https 3306/tcp open mysql
Don't simply report:
“Four ports are open.”
Think:
22 → Remote administration 80 → Web application 443 → Secure web application 3306 → Database
Then ask:
Why is MySQL exposed?
If the database only needs to communicate with the application server, exposing it broadly could be a segmentation problem.
7. Service Correlation
Suppose:
80 → Apache 3306 → MySQL
Then:
Apache ↓ Web Application ↓ MySQL
You now have a potential architecture.
Your next question:
How does the web application communicate with MySQL?
Then:
Where are the database credentials stored?
This is correlation.
8. Analyze HTTP Traffic
Consider:
GET /profile?id=1001 HTTP/1.1 Host: lab.local Cookie: session=...
Don't only look at:
?id=1001
Analyze:
Method URL Parameters Headers Cookies Authentication Authorization Response Content type Status code
Then ask:
What does the server trust?
9. Request → Response Analysis
Always compare:
REQUEST ↓ SERVER ↓ RESPONSE
Example:
GET /api/user/1001
Response:
{ "id": 1001, "name": "Alice", "email": "alice@example.test" }
Now change only the object ID in your authorized lab:
GET /api/user/1002
If another user's data appears, you've identified a potential authorization flaw.
The key analytical technique is:
Change one variable at a time.
10. Differential Analysis
This is one of the most powerful techniques.
Compare:
Request A ↓ Response A Request B ↓ Response B
Then identify what changed.
For example:
| Test | Parameter | Response |
|---|---|---|
| A | id=1001 | User A |
| B | id=1002 | User B |
The difference gives you evidence.
11. Burp Suite Analysis
When using Burp, don't blindly modify requests.
Build a mental model:
Browser ↓ Burp ↓ Request ↓ Server ↓ Response ↓ Burp ↓ Browser
Look for:
- Authentication
- Authorization
- Session handling
- Input validation
- Security headers
- API behavior
- Error messages
- Cookies
- Tokens
- CORS
12. Analyze Cookies
Example:
Set-Cookie: session=abc123; Secure; HttpOnly
Analyze attributes:
Secure
Cookie should be sent over HTTPS.
HttpOnly
Helps prevent JavaScript from directly reading the cookie.
SameSite
Controls cross-site cookie behavior.
You should understand the security implications rather than simply checking whether an attribute exists.
13. Analyze Authentication
Ask:
How does login work? ↓ Where is the password sent? ↓ How is session created? ↓ How is session validated? ↓ Can sessions be reused? ↓ How does logout work? ↓ How does password reset work?
Authentication analysis includes more than:
“There is a login page.”
14. Authentication vs Authorization
Always separate them.
Authentication
Who are you?
Authorization
What are you allowed to do?
Example:
User successfully logs in ↓ Authentication ✅ ↓ User accesses admin endpoint ↓ Authorization ❌
This distinction is responsible for many real-world vulnerabilities.
15. Analyze Error Messages
Errors can reveal valuable information.
Example:
Database connection failed: MySQL 8.0.x
Potential information:
Database type Version Application framework File path Internal hostname Stack trace Query structure
But:
Information disclosure ≠ automatically critical vulnerability.
You need to determine the actual impact.
16. Vulnerability Scanner Analysis
Suppose Nessus reports:
Critical: Potential vulnerable software version
Don't immediately report:
Critical vulnerability.
First investigate:
Scanner Finding ↓ What version? ↓ Is it actually installed? ↓ Is vulnerable feature enabled? ↓ Is system affected? ↓ Are prerequisites present? ↓ Can it be safely validated? ↓ What is actual impact?
This is why scanners assist humans—they don't replace analysis.
17. False Positives
A false positive means a tool reports a problem that isn't actually exploitable or applicable.
Example:
Scanner: Vulnerable Apache version
But after checking:
Backported security patch
The vulnerability may no longer apply.
Therefore:
Scanner output is evidence to investigate, not automatically the final answer.
18. False Negatives
A false negative is the opposite.
The tool says:
No vulnerability detected
But manual testing reveals:
Broken authorization
Business logic flaws are particularly difficult for automated scanners to detect.
That's why manual analysis remains essential.
19. Analyze Logs 📋
Logs are extremely valuable.
Examples:
Web logs Authentication logs Firewall logs DNS logs VPN logs Windows Event Logs Linux syslog Cloud audit logs
Example:
10:30 Login failed 10:31 Login failed 10:32 Login succeeded 10:33 Privileged action
Now you can reconstruct a timeline.
20. Timeline Analysis
A security incident can be represented as:
10:30 → Initial request 10:31 → Authentication attempt 10:32 → Successful login 10:33 → Privileged action 10:35 → Data access 10:40 → Session ended
This is useful in:
- Incident response
- Threat hunting
- Red teaming
- Forensics
- Penetration testing
21. Network Traffic Analysis
Wireshark helps you understand:
Who communicated? ↓ With whom? ↓ Using which protocol? ↓ On which port? ↓ What happened? ↓ Was traffic encrypted?
Example:
Client ↓ TCP Server ↓ HTTP Application
Then investigate whether sensitive information is transmitted securely.
22. DNS Analysis
DNS can reveal architecture.
Example:
www.example.test api.example.test mail.example.test vpn.example.test dev.example.test
Now you can infer:
Web API Mail VPN Development
This is a perfect example of:
Raw data → Architecture inference
23. Active Directory Analysis
You already learned AD enumeration.
Now analyze relationships:
User ↓ Group ↓ Permission ↓ Computer ↓ Session ↓ Administrative access
BloodHound is valuable because it turns this into a graph.
Instead of asking:
“What users exist?”
Ask:
“What path connects this low-privileged user to a high-value asset?”
24. Attack Path Analysis
Example:
Compromised User ↓ MemberOf ↓ IT Support Group ↓ AdminTo ↓ Server01 ↓ HasSession ↓ Domain Admin
This is much more valuable than a list of 500 AD objects.
You are looking for:
Relationships that create attack paths.
25. Attack Chain Analysis
A serious vulnerability may be low-impact alone but dangerous when chained.
Example:
Information Disclosure ↓ Username Discovery ↓ Weak Authentication ↓ Account Access ↓ IDOR ↓ Sensitive Data
Each individual weakness may not look catastrophic.
Together:
Critical Attack Path
26. Risk Analysis
Technical severity isn't the whole story.
Use:
Risk ≈ Likelihood × Impact
Consider:
Likelihood
- Is exploitation easy?
- Is authentication required?
- Is the target exposed?
- Are prerequisites common?
Impact
- Data exposure?
- Account takeover?
- Remote code execution?
- Financial impact?
- Operational disruption?
27. Technical Severity vs Business Risk
Example:
Finding A
Verbose error message
Technical severity:
Low
But suppose it reveals:
Internal database credentials
Now the impact changes significantly.
Another example:
Internet-exposed admin panel
By itself:
Not necessarily a vulnerability.
But if:
Default credentials + Internet exposure + Administrative access
then risk can become critical.
28. CVSS
CVSS helps standardize vulnerability severity.
Remember the broad scale:
| Score | Severity |
|---|---|
| 0 | None |
| 0.1–3.9 | Low |
| 4.0–6.9 | Medium |
| 7.0–8.9 | High |
| 9.0–10.0 | Critical |
But don't simply write:
CVSS = 9.8 → Critical
Also explain:
What can an attacker do? Who can exploit it? What conditions are required? What assets are affected?
29. Root Cause Analysis
Finding the vulnerability is only half the job.
Ask:
Why did this happen?
Example:
Finding: SQL Injection
Root cause:
Application directly concatenates user input into SQL queries.
Better remediation:
Use parameterized queries.
Not:
Block a few special characters.
30. Source Code Analysis
Suppose you see:
query = "SELECT * FROM users WHERE id=" + user_id
Analysis:
User input ↓ String concatenation ↓ SQL query ↓ Database
Trust boundary:
Untrusted ↓ Application ↓ Database
That's the critical point.
31. Data Flow Analysis
For any input, trace:
INPUT ↓ Validation ↓ Transformation ↓ Storage ↓ Processing ↓ Output
For example:
HTTP Parameter ↓ Controller ↓ Business Logic ↓ Database
This technique helps identify:
- SQL injection
- XSS
- Command injection
- SSRF
- Path traversal
- Template injection
32. Trust Boundary Analysis
Ask:
Where does trusted data become untrusted?
Example:
Internet │ ▼ Web Server │ ▼ Application │ ▼ Database
Every boundary is worth analyzing.
Especially:
User → Application Application → Database Application → Internal API Cloud → Application Container → Host Client → Server
33. Threat Modeling
Before testing an application, identify:
Assets
What must be protected?
User accounts Customer data Source code Payment information Credentials
Threat actors
Who might attack?
External attacker Malicious insider Compromised account Automated bot
Attack surfaces
Web API Mobile Network Cloud IoT
34. STRIDE
A useful threat-modeling framework:
S → Spoofing T → Tampering R → Repudiation I → Information Disclosure D → Denial of Service E → Elevation of Privilege
Example:
API │ ├── Spoofing → authentication ├── Tampering → request integrity ├── Repudiation → logging ├── Information Disclosure → data exposure ├── DoS → resource exhaustion └── Elevation → authorization
35. Hypothesis-Driven Testing
This is an advanced professional skill.
Instead of:
“Let's try everything.”
Think:
“I observed X. If my hypothesis is correct, Y should happen.”
Example:
Observation: User ID appears in request. Hypothesis: Authorization may depend only on object ID. Test: Change object ID using a second test account. Expected if vulnerable: Unauthorized object returned.
This makes testing:
- Faster
- More organized
- More defensible
- Easier to document
36. One Variable at a Time
Suppose:
POST /api/profile
contains:
{ "name": "Uday", "email": "test@example.com", "role": "user" }
Don't change five things simultaneously.
Instead:
Test 1 → name Test 2 → email Test 3 → role Test 4 → authorization
Then you know which change caused the behavior.
37. Anomaly Analysis
Security analysis often means spotting something unusual.
Examples:
Normal: 200 OK Interesting: 500 Internal Server Error
or:
Normal response: 2 KB Modified input: 150 KB
or:
Normal: 100 ms Special request: 5 seconds
Anomalies can reveal:
- Input validation issues
- Logic flaws
- Resource exhaustion
- Hidden functionality
- Backend errors
But anomaly ≠ vulnerability.
It is a clue.
38. Analyze Authentication Behavior
Compare:
Correct username + correct password Correct username + wrong password Wrong username + wrong password Expired session Missing session Modified session
Look for:
Status codes Response length Timing Messages Cookies Redirects
Differences may reveal useful information.
39. Analyze Authorization
Create a test matrix:
| User | Resource | Action | Result |
|---|---|---|---|
| User A | Own profile | Read | ✅ |
| User A | Own profile | Edit | ✅ |
| User A | User B profile | Read | ? |
| User A | Admin page | Read | ? |
| Admin | Admin page | Read | ✅ |
This makes authorization testing systematic.
40. Evidence Quality
Weak evidence:
“It looks vulnerable.”
Strong evidence:
Affected endpoint: GET /api/users/{id} Authenticated test user: userA Expected: Only userA's data Observed: Changing {id} returns userB's data Impact: Cross-account information disclosure
That's professional evidence.
41. Security Analysis Notebook
Keep notes during testing.
Example:
Target: LAB-WEB Date: 2026-10-08 Recon: api.lab.local discovered Scanning: 443/tcp open Web: REST API identified Authentication: JWT Potential issue: Object IDs appear sequential Hypothesis: BOLA possible Validation: Second test account accessed another test account's object Impact: Cross-user data exposure Recommendation: Server-side ownership authorization
This makes reporting much easier.
42. Analysis Tools
Your toolkit can include:
Burp Suite Wireshark Nmap Nuclei Nessus/OpenVAS BloodHound Ghidra JADX MobSF Docker tools jq grep awk sed Python
But remember:
Tools produce data. You produce the analysis.
43. Python for Security Analysis 🐍
Since you know Python, use it to automate analysis.
Example concept:
logs = [ "LOGIN_FAIL user=alice", "LOGIN_FAIL user=alice", "LOGIN_SUCCESS user=alice", "ADMIN_ACTION user=alice" ] for entry in logs: print(entry)
You can eventually build scripts that:
- Parse logs
- Extract IPs
- Extract domains
- Compare HTTP responses
- Analyze scan results
- Search for indicators
- Generate reports
Python becomes a force multiplier.
44. Analysis Lab
Take your previous vulnerable web lab.
Run:
Nmap ↓ Burp ↓ Application ↓ Logs ↓ Database
Then create this table:
| Observation | Hypothesis | Test | Result | Impact |
|---|---|---|---|---|
/api/user/ID | BOLA | Change ID | Unauthorized data | High |
| Verbose error | Info leak | Invalid input | Stack trace | Low |
| Admin endpoint | Missing authorization | Normal user | Access denied | None |
| Debug endpoint | Exposed functionality | Request endpoint | Debug info | Medium |
This exercise will dramatically improve your security reasoning.
45. The Professional Analysis Framework 🧠
For every suspicious behavior, use:
1. WHAT did I observe? ↓ 2. WHY might it happen? ↓ 3. WHAT is my hypothesis? ↓ 4. HOW can I safely test it? ↓ 5. WHAT changed? ↓ 6. CAN I reproduce it? ↓ 7. WHO can exploit it? ↓ 8. WHAT can they achieve? ↓ 9. WHAT is the business impact? ↓ 10. WHY did the vulnerability exist? ↓ 11. HOW should it be fixed? ↓ 12. CAN I retest the fix?
If you can consistently follow this process, you're moving from tool-based hacking toward professional penetration testing.
🧠 Most Important Lesson
The most valuable skill isn't:
Nmap Burp Metasploit Wireshark
It's:
OBSERVE + THINK + CORRELATE + TEST + PROVE
A good security professional can look at a small amount of information and determine what it means and what to investigate next.