Skip to content
XSS Write-up Beginner

Identifikasi serangan Scanning, XSS, serta SQL injection dari fil

A packet capture file was analysed in Wireshark and found to contain traffic showing port scanning, an XSS attempt and a SQL injection attempt against a web server. The text describes how to spot each attack in the capture but does not show that any of them succeeded.

Zoya Anzasmara Follow

Published on medium.com

Dalam dunia cybersecurity, menganalisis lalu lintas jaringan adalah salah satu keterampilan penting untuk mendeteksi dan memahami serangan. File PCAP (Packet Capture) menyimpan rekaman paket data yang dapat digunakan untuk mengidentifikasi berbagai jenis ancaman, seperti Scanning, cross-site scripting (XSS), dan SQL…

Zoya Anzasmara, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the web application passed user-supplied URL parameters into page output and into a database query without validation, sanitisation or parameterised queries, and the host exposed port 80 to rapid connection attempts.

Impact

If the application lacked input validation, the injected query could return all user records including password hashes, and the injected script could run in a victim's browser, though the text does not confirm either succeeded.

What the attacker needed

Captured network traffic file; Wireshark installed; attacker on same network segment

The fix

The application should use parameterised queries, validate and sanitise input, encode output, apply a Content Security Policy and monitor for suspicious requests.

How it was found

  1. Open the capture file in Wireshark via the File menu.
  2. Filter for SYN packets without ACK to spot the scanning host.
  3. Filter HTTP requests whose URI contains a script tag to find the XSS attempt.
  4. Filter HTTP requests whose URI contains a SQL keyword to find the injection attempt.
  5. Read the request details to identify source, target, method and parameter.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Someone captured the network traffic of a small network into a file and then looked through it. In that traffic they saw one machine repeatedly probing another, one request that tried to sneak a script into a web page, and one request that tried to slip a database command into a web address. The write-up only shows how to find these attempts in the traffic; it does not show that any of them worked.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.