【metasploit postgres】

问题: 无法联接到服务器: 没有那个文件或目录  服务器是否在本地运行并且在 Unix 域套接字       "/var/run/postgresql/.s.PGSQL.5432"上准备接受联接?

psql: could not connect to server: 没有那个文件或目录
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

解决方法: /sbin/chkconfig postgresql on
service postgresql start 

初始化:

passwd postgres                                              修改postgres密码
su postgres                                                                进入数据库
createuser xxx -P                                            创建xxx用户(然后输入密码,Y/N一直选择N即可)
createdb --owner=user xxx                              创建一个XXX数据库
psql xxx                                                             进入xxx数据库
psql -l                                                                列出数据库
dropuser                                                           删除用户
dropdb                                                              删除数据库

连接  db_connect zql:zql@127.0.0.1/msfbook


tcp端口扫描:

msf > use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > show options 


Module options (auxiliary/scanner/portscan/tcp):


   Name         Current Setting  Required  Description
   ----         ---------------  --------  -----------
   CONCURRENCY  10               yes       The number of concurrent ports to check per host
   PORTS        1-10000          yes       Ports to scan (e.g. 22-25,80,110-900)
   RHOSTS                        yes       The target address range or CIDR identifier
   THREADS      1                yes       The number of concurrent threads
   TIMEOUT      1000             yes       The socket connect timeout in milliseconds

msf auxiliary(tcp) > set rhosts 192.168.123.12
rhosts => 192.168.123.12
msf auxiliary(tcp) > set threads 8
threads => 8


msf auxiliary(tcp) > show options 


Module options (auxiliary/scanner/portscan/tcp):


   Name         Current Setting  Required  Description
   ----         ---------------  --------  -----------
   CONCURRENCY  10               yes       The number of concurrent ports to check per host
   PORTS        1-10000          yes       Ports to scan (e.g. 22-25,80,110-900)
   RHOSTS       192.168.123.12   yes       The target address range or CIDR identifier
   THREADS      8                yes       The number of concurrent threads
   TIMEOUT      1000             yes       The socket connect timeout in milliseconds

msf auxiliary(tcp) > run


[*] 192.168.123.12:139 - TCP OPEN
[*] 192.168.123.12:135 - TCP OPEN
[*] 192.168.123.12:445 - TCP OPEN
[*] 192.168.123.12:1110 - TCP OPEN
[*] 192.168.123.12:7504 - TCP OPEN
[*] 192.168.123.12:7514 - TCP OPEN
[*] 192.168.123.12:7513 - TCP OPEN
[*] 192.168.123.12:8082 - TCP OPEN
[*] 192.168.123.12:9535 - TCP OPEN
[*] 192.168.123.12:9595 - TCP OPEN
[*] 192.168.123.12:9594 - TCP OPEN
[*] 192.168.123.12:9593 - TCP OPEN
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed


load db_autopwn 自动化攻击 

msf > load db_autopwn
[ - ] Failed to load plugin from / opt / framework3 / msf3 / plugins / db_autopwn: no such file to load - - / opt / framework3 / msf3 / plugins / db_autopwn

http://download.csdn.net/detail/terrying/5063334


BT5R3→ /opt/framework3/msf3/plugins/ 
Linxu→/opt/metasploit/msf3/plugins/

Windows→[metasploit]/apps/pro/msf3/plugins/db_autopwn.rb


http://www.2cto.com/Article/201212/177736.html

http://www.freebuf.com/articles/web/5628.html?zplnrzfumynzriqe


db_autopwn -t -p -r -e

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值