by trying the XSS room on THM, I try was trying to read the /etc/passwd using the following cmd:
<iframe src="/etc/passwd"></iframe>
However what I got is an error code as shown below
But I was be able to read from css/style.css using:
<iframe src="css/style.css"></iframe>
Can somebody explain to me why ?
Note that this is a linux system:
80/tcp open http syn-ack ttl 64 Node.js (Express middleware)
|_http-favicon: Unknown favicon MD5: E49ECF40C7FDF87B783F5D2B575FE517
| http-methods:
|_ Supported Methods: GET HEAD POST OPTIONS
|_http-title: THM ~ XSS Playground
MAC Address: 02:F6:01:DB:D4:DF (Unknown)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose|WAP|phone|webcam
Running (JUST GUESSING): Linux 3.X|4.X|2.6.X (95%), Asus embedded (94%), Google Android 5.X|6.X|7.X (92%)
OS CPE: cpe:/o:linux:linux_kernel:3.13 cpe:/h:asus:rt-n56u cpe:/o:linux:linux_kernel:3.4 cpe:/o:google:android:5 cpe:/o:google:android:6 cpe:/o:linux:linux_kernel:3.18 cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:2.6.17
OS fingerprint not ideal because: Missing a closed TCP port so results incomplete
Aggressive OS guesses: Linux 3.13 (95%), ASUS RT-N56U WAP (Linux 3.4) (94%), Linux 3.16 (94%), Linux 3.1 (93%), Linux 3.2 (93%), Android 5.0 - 5.1 (92%), Android 6.0-7.1.2 (Linux 3.18-4.4.1) (92%), Linux 3.12 (92%), Linux 3.2 - 3.10 (92%), Linux 3.2 - 3.16 (92%)