Guest User

Untitled

a guest
Dec 28th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Some more commands to add to Java Meterpreter
  2.  
  3. meterp_compare module is at: https://github.com/schierlm/metasploit-framework/blob/0898309db9f0d8e05850e3e37b71119ae64864d9/unstable-modules/auxiliary/meterp_compare.rb
  4.  
  5. meterp_compare output is at: http://pastebin.com/gYDJwFeQ
  6.  
  7. "Architecture"
  8. -> System.getProperty("os.arch")
  9. http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperty(java.lang.String)
  10. @since 1.0
  11.  
  12. "System Language"
  13. -> Easy, Locale.getDefault().toString()
  14. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Locale.html#getDefault()
  15. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Locale.html#toString()
  16. @since 1.0
  17.  
  18. stdapi_fs_delete
  19. -> File.delete()
  20. http://docs.oracle.com/javase/1.5.0/docs/api/java/io/File.html#delete()
  21. @since 1.0
  22.  
  23. stdapi_sys_config_getenv
  24. -> System.getenv()
  25. http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv()
  26. @since 1.5
  27. Note that the version that takes a String was available before, but did not return system environment variables
  28. A sensible fallback for Pre 1.5 JDK would be to return empty results or hack something up for %COMSPEC% (similar to expand_path)
  29.  
  30.  
  31. stdapi_fs_file_move
  32. -> File.renameTo()
  33. http://docs.oracle.com/javase/1.5.0/docs/api/java/io/File.html#renameTo(java.io.File)
  34. @since 1.0
  35. Be aware that renameTo can fail due to platform specific reasons, so the proper fallback would be a copy loop
  36.  
  37. stdapi_net_resolve_host
  38. stdapi_net_resolve_hosts
  39. InetAddress.getByName(...).getAddress() [or getHostAddress()]
  40. http://docs.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html#getByName(java.lang.String)
  41. http://docs.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html#getAddress()
  42. @since 1.0
  43.  
  44. stdapi_net_config_get_proxy
  45. -> possible if running inside an applet, but AFAIK not possible when spawned separately
Advertisement
Add Comment
Please, Sign In to add comment