Skip to content

Commit 897ad6f

Browse files
committed
Some service yarddoc
1 parent 1a3b319 commit 897ad6f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/msf/core/exploit/smb/psexec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def smb_read_file(smbshare, host, file)
5151
# instead of all the ghetto "rescue ::Exception" madness
5252
# @param command [String] Should be a valid windows command
5353
# @param disconnect [Boolean] Disconnect afterwards
54+
# @param service_description [String] Service Description
55+
# @param service_name [String] Service Name
56+
# @param display_name [Strnig] Display Name
5457
# @return [Boolean] Whether everything went well
5558
def psexec(command, disconnect=true, service_description=nil, service_name=nil, display_name=nil)
5659
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")

lib/msf/util/exe.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ def self.to_win32pe_old(framework, code, opts={})
412412
return pe
413413
end
414414

415+
416+
# Splits a string into a number of assembly push operations
417+
#
418+
# @param string [String] string to be used
419+
#
420+
# @return [String] null terminated string as assembly push ops
415421
def self.string_to_pushes(string)
416422
str = string.dup
417423
# Align string to 4 bytes
@@ -512,6 +518,17 @@ def self.to_win64pe(framework, code, opts={})
512518
exe_sub_method(code,opts)
513519
end
514520

521+
# Embeds shellcode within a Windows PE file implementing the Windows
522+
# service control methods.
523+
#
524+
# @param framework [Object]
525+
# @param code [String] shellcode to be embedded
526+
# @option opts [Boolean] :sub_method use substitution technique with a
527+
# service template PE
528+
# @option opts [String] :servicename name of the service, not used in
529+
# substituion technique
530+
#
531+
# @return [String] Windows Service PE file
515532
def self.to_win32pe_service(framework, code, opts={})
516533
if opts[:sub_method]
517534
# Allow the user to specify their own service EXE template

0 commit comments

Comments
 (0)