Path: blob/master/spec/support/acceptance/session/php.rb
31424 views
require_relative './shared'12module Acceptance::Session::Php3PHP_METERPRETER = {4payloads: [5{6name: "php/meterpreter_reverse_tcp",7extension: ".php",8platforms: [:osx, :linux, :windows],9execute_cmd: ["php", "${payload_path}"],10generate_options: {11'-f': "raw"12},13datastore: {14global: {},15module: {16MeterpreterDebugBuild: true17}18}19}20],21module_tests: [22{23name: "post/test/services",24platforms: [25[26:linux,27{28skip: true,29reason: "Windows only test"30}31],32[33:osx,34{35skip: true,36reason: "Windows only test"37}38],39[40:windows,41{42skip: [43:meterpreter_runtime_version,44:==,45"php5.3"46],47reason: "Skip PHP 5.3 as the tests timeout - due to cmd_exec taking 15 seconds for each call. Caused by failure to detect feof correctly - https://github.com/rapid7/metasploit-payloads/blame/c7f7bc2fc0b86e17c3bc078149c71745c5e478b3/php/meterpreter/meterpreter.php#L1127-L1145"48}49]50],51skipped: false,52lines: {53linux: {54known_failures: []55},56osx: {57known_failures: []58},59windows: {60known_failures: []61}62}63},64{65name: "post/test/cmd_exec",66platforms: [:linux, :osx, :windows],67skipped: false,68lines: {69linux: {70known_failures: []71},72osx: {73known_failures: []74},75windows: {76known_failures: [77]78}79}80},81{82name: "post/test/extapi",83platforms: [:linux, :osx, :windows],84skipped: false,85lines: {86linux: {87known_failures: []88},89osx: {90known_failures: []91},92windows: {93known_failures: []94}95}96},97{98name: "post/test/file",99platforms: [:linux, :osx, :windows],100skipped: false,101lines: {102linux: {103known_failures: [104"[-] FAILED: should read the binary data we just wrote"105]106},107osx: {108known_failures: [109"[-] FAILED: should read the binary data we just wrote"110]111},112windows: {113known_failures: [114"[-] [should delete a symbolic link target] FAILED: should delete a symbolic link target",115"[-] [should delete a symbolic link target] Exception: Rex::Post::Meterpreter::RequestError: stdapi_fs_delete_dir: Operation failed: 1",116"[-] FAILED: should read the binary data we just wrote"117]118}119}120},121{122name: "post/test/get_env",123platforms: [:linux, :osx, :windows],124skipped: false,125lines: {126linux: {127known_failures: []128},129osx: {130known_failures: []131},132windows: {133known_failures: []134}135}136},137{138name: "post/test/meterpreter",139platforms: [:linux, :osx, :windows],140skipped: false,141lines: {142linux: {143known_failures: []144},145osx: {146known_failures: [147"[-] FAILED: should return a list of processes"148]149},150windows: {151known_failures: []152}153}154},155{156name: "post/test/railgun",157platforms: [:linux, :osx, :windows],158skipped: false,159lines: {160linux: {161known_failures: []162},163osx: {164known_failures: []165},166windows: {167known_failures: []168}169}170},171{172name: "post/test/railgun_reverse_lookups",173platforms: [:linux, :osx, :windows],174skipped: false,175lines: {176linux: {177known_failures: []178},179osx: {180known_failures: []181},182windows: {183known_failures: []184}185}186},187{188name: "post/test/registry",189platforms: [190[191:linux,192{193skip: true,194reason: "Windows only test"195}196],197[198:osx,199{200skip: true,201reason: "Windows only test"202}203],204[205:windows,206{207skip: [208:meterpreter_runtime_version,209:==,210"php5.3"211],212reason: "Skip PHP 5.3 as the tests timeout - due to cmd_exec taking 15 seconds for each call. Caused by failure to detect feof correctly - https://github.com/rapid7/metasploit-payloads/blame/c7f7bc2fc0b86e17c3bc078149c71745c5e478b3/php/meterpreter/meterpreter.php#L1127-L1145"213}214]215],216skipped: false,217lines: {218linux: {219known_failures: []220},221osx: {222known_failures: []223},224windows: {225known_failures: []226}227}228},229{230name: "post/test/search",231platforms: [:linux, :osx, :windows],232skipped: false,233lines: {234linux: {235known_failures: []236},237osx: {238known_failures: []239},240windows: {241known_failures: []242}243}244},245{246name: "post/test/socket_channels",247platforms: [:linux, :osx, :windows],248skipped: false,249lines: {250linux: {251known_failures: [252"[-] [[TCP-Server] Allows binding to port 0] FAILED: [TCP-Server] Allows binding to port 0",253"[-] [[TCP-Server] Allows binding to port 0] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",254"[-] [[TCP-Server] Accepts a connection] FAILED: [TCP-Server] Accepts a connection",255"[-] [[TCP-Server] Accepts a connection] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",256"[-] [[TCP-Server] Has the correct peer information] FAILED: [TCP-Server] Has the correct peer information",257"[-] [[TCP-Server] Has the correct peer information] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",258"[-] [[TCP-Server] Receives data from the peer] FAILED: [TCP-Server] Receives data from the peer",259"[-] [[TCP-Server] Receives data from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",260"[-] [[TCP-Server] Sends data to the peer] FAILED: [TCP-Server] Sends data to the peer",261"[-] [[TCP-Server] Sends data to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",262"[-] [[TCP-Server] Propagates close events to the server] FAILED: [TCP-Server] Propagates close events to the server",263"[-] [[TCP-Server] Propagates close events to the server] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",264"[-] [[TCP-Server] Propagates close events to the peer] FAILED: [TCP-Server] Propagates close events to the peer",265"[-] [[TCP-Server] Propagates close events to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",266"[-] [[TCP-Server] Propagates close events from the peer] FAILED: [TCP-Server] Propagates close events from the peer",267"[-] [[TCP-Server] Propagates close events from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",268"[-] FAILED: [UDP] Has the correct peer information",269*Acceptance::Session::Shared::SOCKET_CHANNEL_FLAKES270]271},272osx: {273known_failures: [274"[-] [[TCP-Server] Allows binding to port 0] FAILED: [TCP-Server] Allows binding to port 0",275"[-] [[TCP-Server] Allows binding to port 0] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",276"[-] [[TCP-Server] Accepts a connection] FAILED: [TCP-Server] Accepts a connection",277"[-] [[TCP-Server] Accepts a connection] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",278"[-] [[TCP-Server] Has the correct peer information] FAILED: [TCP-Server] Has the correct peer information",279"[-] [[TCP-Server] Has the correct peer information] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",280"[-] [[TCP-Server] Receives data from the peer] FAILED: [TCP-Server] Receives data from the peer",281"[-] [[TCP-Server] Receives data from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",282"[-] [[TCP-Server] Sends data to the peer] FAILED: [TCP-Server] Sends data to the peer",283"[-] [[TCP-Server] Sends data to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",284"[-] [[TCP-Server] Propagates close events to the server] FAILED: [TCP-Server] Propagates close events to the server",285"[-] [[TCP-Server] Propagates close events to the server] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",286"[-] [[TCP-Server] Propagates close events to the peer] FAILED: [TCP-Server] Propagates close events to the peer",287"[-] [[TCP-Server] Propagates close events to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",288"[-] [[TCP-Server] Propagates close events from the peer] FAILED: [TCP-Server] Propagates close events from the peer",289"[-] [[TCP-Server] Propagates close events from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",290"[-] FAILED: [UDP] Has the correct peer information",291*Acceptance::Session::Shared::SOCKET_CHANNEL_FLAKES292]293},294windows: {295known_failures: [296"[-] [[TCP-Server] Allows binding to port 0] FAILED: [TCP-Server] Allows binding to port 0",297"[-] [[TCP-Server] Allows binding to port 0] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",298"[-] [[TCP-Server] Accepts a connection] FAILED: [TCP-Server] Accepts a connection",299"[-] [[TCP-Server] Accepts a connection] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",300"[-] [[TCP-Server] Has the correct peer information] FAILED: [TCP-Server] Has the correct peer information",301"[-] [[TCP-Server] Has the correct peer information] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",302"[-] [[TCP-Server] Receives data from the peer] FAILED: [TCP-Server] Receives data from the peer",303"[-] [[TCP-Server] Receives data from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",304"[-] [[TCP-Server] Sends data to the peer] FAILED: [TCP-Server] Sends data to the peer",305"[-] [[TCP-Server] Sends data to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",306"[-] [[TCP-Server] Propagates close events to the server] FAILED: [TCP-Server] Propagates close events to the server",307"[-] [[TCP-Server] Propagates close events to the server] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",308"[-] [[TCP-Server] Propagates close events to the peer] FAILED: [TCP-Server] Propagates close events to the peer",309"[-] [[TCP-Server] Propagates close events to the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",310"[-] [[TCP-Server] Propagates close events from the peer] FAILED: [TCP-Server] Propagates close events from the peer",311"[-] [[TCP-Server] Propagates close events from the peer] Exception: Rex::Post::Meterpreter::RequestError: core_channel_open: Operation failed: 1",312"[-] FAILED: [UDP] Has the correct peer information",313*Acceptance::Session::Shared::SOCKET_CHANNEL_FLAKES314]315}316}317},318{319name: "post/test/unix",320platforms: [321:linux,322:osx,323[324:windows,325{326skip: true,327reason: "Unix only test"328}329]330],331skipped: false,332lines: {333linux: {334known_failures: []335},336osx: {337known_failures: []338},339windows: {340known_failures: []341}342}343}344]345}346end347348349