首页 > 其他分享 >Me-and-My-Girlfriend-1靶机渗透流程

Me-and-My-Girlfriend-1靶机渗透流程

时间:2023-05-28 16:22:08浏览次数:53  
标签:Me alice Alice flag Girlfriend 靶机 My Bob bash

Me-and-My-Girlfriend-1

靶机下载

Description: This VM tells us that there are a couple of lovers namely Alice and Bob, where the couple was originally very romantic, but since Alice worked at a private company, "Ceban Corp", something has changed from Alice's attitude towards Bob like something is "hidden", And Bob asks for your help to get what Alice is hiding and get full access to the company!

Difficulty Level: Beginner

Notes: there are 2 flag files

Learning: Web Application | Simple Privilege Escalation

获取靶机地址

nmap  192.168.157.0/24

访问一下,确认是靶机地址

登入网址

查看源代码,有提示<!-- Maybe you can search how to use x-forwarded-for -->

抓包改包成本地地址,xff绕过

X-Forwarded-for:127.0.0.1

得到登录界面

我这里用的谷歌插件X-Forwarded-For Header

随便注册一个账户登录

获取alice用户密码

在Profile页面有id参数,尝试后发现SQL注入

在id=5时发现alice用户,修改前端得到密码4lic3

ssh登入alice用户

这时就可以用ssh连接靶机了

登录成功

得到flag1:gfriEND{2f5f21b2af1b8c3e227bcf35544f8f09}

还有alice的小秘密

alice@gfriEND:~/.my_secret$ cat my_notes.txt 
Woahhh! I like this company, I hope that here i get a better partner than bob ^_^, hopefully Bob doesn't know my notes

提权

还有一个flag需要root权限,现在要想办法提权

先用sudo -l查看授权的命令列表

发现可以使用php命令

sudo php -r 'system("/bin/bash");'

这条命令会在Linux系统上执行一个反弹shell

sudo: 使用root权限执行命令
php: 执行PHP代码
-r: 直接在命令行运行PHP代码
system("/bin/bash");: 运行system()函数执行/bin/bash命令,打开一个bash shell

提权成功,查找flag

find / -name 'flag*.*'

得到flag2:gfriEND{56fbeef560930e77ff984b644fde66e7}

简单总结

一套入门级的靶机,很适合我这种新手,能够熟悉下最基本的渗透流程

标签:Me,alice,Alice,flag,Girlfriend,靶机,My,Bob,bash
From: https://www.cnblogs.com/Mar10/p/17438426.html

相关文章

  • MyBatis之返回值处理
    MyBatis之返回值处理1、返回值为基本数据类型当我们的SQL语句执行结束,要返回的类型为基本数据类型的时候,直接写你要返回的类型即可<insertid="addUser"parameterType="com.liu.pojo.User">insertintotb_uservalues(null,#{username},#{password});</insert>......
  • 解决 Failed to connect to github.com port 443:connection timed out
    晕了,今天不知道怎么出现了这个问题gitconfig--globalhttp.proxyhttp://127.0.0.1:1080gitconfig--globalhttps.proxyhttp://127.0.0.1:1080问题得到解决取消代理gitconfig--global--unsethttp.proxygitconfig--global--unsethttps.proxy我也记不清到底......
  • MySQL学习进阶篇Day3
    2.4索引语法1).创建索引CREATE[UNIQUE|FULLTEXT]INDEXindex_nameONtable_name(index_col_name,...);  2).查看索引SHOWINDEXFROMtable_name;  3).删除索引DROPINDEXindex_nameONtable_name;  案例演示:先来创建一张表tb_use......
  • python -- 解决连接sqlserver出现的“ pymssql._pymssql.OperationalError: (20009, b
     因为工作关系,近期需要用python连接sqlserver处理一些数据问题。由于笔记本上的软件是新安装的,所以有些配置避免不了重新设置,期间遇到一些小问题,记录一下。 下面正式开始写一段代码,测试sqlserver数据库连接importpymssql#写法1#conn=pymssql.connect(host='localho......
  • 使用linux安装mysql步骤
    在Linux上安装MySQL的详细步骤:打开终端并登录到Linux系统。使用以下命令更新系统软件包列表:sudoaptupdate安装MySQL服务器:sudoaptinstallmysql-server在安装过程中,系统会提示您输入MySQLroot用户的密码。请确保您输入的密码足够强度,并且请记住该密码。它将在以后访问MySQL时......
  • WPF中使用EntityFramework6和Identity
    2023年05月28日VS2022WFP.NETFramework,Version=v4.6.2测试通过NUGET:EntityFramework6.4.4,Microsoft.AspNet.Identity.EntityFramework2.2.3  //扩展内置的identityuserpublicclassApplicationUser:IdentityUser{publicstringSex{set;g......
  • phpcms系统连接mysql失败
    phpcmsv9安装程序代码对提交的密码中特殊字符(如:&$^!@#)未进行escape转义处理。解决办法:1、修改install/step5.tpl.php127行为:'&dbpw='+escape($('#dbpw').val())2、修改install/step6.tpl.php55行为:vardbpw=escape('<?=$dbpw?>');......
  • 死循环Game
    packagecom.karl;importjava.util.Random;importjava.util.Scanner;publicclassGameDemo{publicstaticvoidmain(String[]args){//1.生成一个随机号码Randomr=newRandom();intl=r.nextInt(100)+1;//定义一个死......
  • Mybatis框架
    1、什么是框架?它是我们软件开发中的一套解决方案,不同的框架解决不同的问题。使用框架的好处:框架封装了很多细节,使开发者可以使用极简的方式实现功能,大大提高开发效率。2、三层架构:表现层:用于展示数据业务层:处理业务需求持久层:与数据库交互的3、持久层......
  • springboot+springsecurity+jwt+elementui图书管理系统
    图书管理系统关注公号:java大师,回复“图书”,获取源码一、springboot后台1、mybatis-plus整合1.1添加pom.xml<!--mp逆向工程--><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></de......