freeBuf
主站

分类

云安全 AI安全 开发安全 终端安全 数据安全 Web安全 基础安全 企业安全 关基安全 移动安全 系统安全 其他安全

特色

热点 工具 漏洞 人物志 活动 安全招聘 攻防演练 政策法规

点我创作

试试在FreeBuf发布您的第一篇文章 让安全圈留下您的足迹
我知道了

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

Ronin:一款用于安全研究和安全开发的Ruby工具包
Alpha_h4ck 2024-10-29 14:48:03 97689
所属地 广西

关于Ronin

Ronin是一款免费的开源Ruby工具包,旨在用于安全研究和开发。

Ronin 包含许多不同的CLI 命令和 Ruby 库,可用于执行各种安全任务,例如编码/解码数据、过滤 IP/主机/URL、查询 ASN、查询 DNS、HTTP、检测 Web 漏洞、执行资源爬取、 Payload检测、管理本地数据库、 托管模糊测试数据、执行网络侦察等等。

适合的用户

CTF 玩家

漏洞赏金猎人

安全研究人员

安全工程师

开发人员

学生

功能介绍

1、使用ronin命令快速处理和查询各种数据。

2、在 Ruby REPL中高效处理代码和数据ronin irb。

3、使用ronin-support和其他ronin 库快速制作 Ruby 脚本原型。

4、使用ronin-repos测试第三方Payload git存储库。

5、使用ronin-db数据库导入和查询数据。

6、使用ronin-fuzzer模糊数据。

7、使用ronin-recon进行网络侦察。

8、使用常见的Payload或使用ronin-payloads编写自己的Payload。

9、使用ronin-exploits编写/运行Payload。

10、使用ronin-vulns扫描网络安全问题。

11、使用ronin-app执行扫描并在浏览器中浏览数据库。

工具要求

gcc / clang

make

git

libsqlite3

Ruby >= 3.1.0

open_namespace ~> 0.4

rouge ~> 3.0

async-io ~> 1.0

wordlist ~> 1.1

ronin-support ~> 1.1

ronin-dns-proxy ~> 0.1

ronin-core ~> 0.2

ronin-repos ~> 0.1

ronin-wordlists ~> 0.1

ronin-db ~> 0.1

ronin-listener ~> 0.1

ronin-nmap ~> 0.1

ronin-masscan ~> 0.1

ronin-recon ~> 0.1

ronin-fuzzer ~> 0.1

ronin-web ~> 2.0

ronin-code-asm ~> 1.0

ronin-code-sql ~> 2.0

ronin-payloads ~> 0.1

ronin-exploits ~> 1.0

ronin-vulns ~> 0.2

ronin-app ~> 0.1

工具安装

Bash脚本

curl -o ronin-install.sh https://raw.githubusercontent.com/ronin-rb/scripts/main/ronin-install.sh && bash ronin-install.sh

Docker

docker pull roninrb/ronin

docker run -it roninrb/ronin

docker run --mount type=bind,source="$HOME",target=/home/ronin -it ronin

工具使用

Usage: ronin [options] [COMMAND [ARGS...]]

 

Options:

    -h, --help                       Print help information

 

Arguments:

    [COMMAND]                        The command name to run

    [ARGS ...]                       Additional arguments for the command

 

Commands:

    archive

    asn

    banner-grab

    bitflip

    cert-dump

    cert-gen

    cert-grab

    completion

    decode, dec

    decrypt

    dns

    dns-proxy

    email-addr

    encode, enc

    encrypt

    entropy

    escape

    extract

    grep

    help

    hexdump

    highlight

    hmac

    homoglyph

    host

    http

    ip

    iprange

    irb

    md5

    netcat, nc

    new

    pack

    proxy

    public-suffix-list

    quote

    rot

    sha1

    sha256

    sha512

    strings

    tld-list

    tips

    typo

    typosquat

    unarchive

    unescape

    unhexdump

    unpack

    unquote

    url

    xor

 

Additional Ronin Commands:

    $ ronin-repos

    $ ronin-wordlists

    $ ronin-db

    $ ronin-web

    $ ronin-fuzzer

    $ ronin-masscan

    $ ronin-nmap

    $ ronin-recon

    $ ronin-payloads

    $ ronin-exploits

    $ ronin-vulns

$ ronin-app

查看工具帮助信息:

$ ronin help

查看命令的手册页:

$ ronin help COMMAND

获取有关如何使用的随机提示:

$ ronin tips

打开 Ronin Ruby REPL:

$ ronin irb

                                                                   , Jµ     ▓▓█▓

                                                  J▌      ▐▓██▌ ████ ██    ▐███D

                                      ╓▄▓▓█████▌  ██µ     ████ ▄███ÖJ██▌   ███▌

        ,╓µ▄▄▄▄▄▄▄▄µ;,            ,▄▓██████████  ▐███    ▐███▀ ███▌ ████µ ▄███

¬∞MÆ▓███████████████████████▓M  ▄██████▀▀╙████▌  ████▌   ████ ▄███ J█████ ███▌

           `█████▀▀▀▀▀███████  -████▀└    ████  ▐█████n ▄███O ███▌ ██████████

           ▓████L       ████▀  ▓████     ▓███Ö  ███████ ███▌ ▓███ ▐█████████▀

          ▄████▀  ,╓▄▄▄█████  J████Ü    ,███▌  ▄███████████ J███▀ ████ █████

         J█████████████████─  ████▌     ████   ████`██████▌ ████ ▐███Ü ▐███Ü

         ███████████▀▀▀╙└    ▐████     J███▌  ▓███▌ ²█████ J███Ü ███▌   ▀█▌

        ▓██████████▌         ████▌     ████  ;████   ▀███▀ ███▌ J▀▀▀-    █

       ▄█████▀ ▀█████µ      ▐████  ,▄▓████▀  ████▀    ███ J███           `

      J█████-    ╙▀███▄     ████████████▀╙  J█▀▀▀      █U  ▀█▌

      ████▀         ▀███   ▄████████▀▀                 ╨    █

     ▓██▀             ²▀█▄ █▀▀▀╙└

    ▄██╜                 ╙W

   J█▀

   ▌└

  ┘

 

irb(ronin)>

启动并打开 Ronin 的交互式 Web UI:

$ ronin-app

工具运行演示

二进制

多种格式的十六进制转储数据:

$ ronin hexdump /bin/ls

将十六进制转储文件还原为其原始的二进制数据:

$ ronin unhexdump -o data.bin hexdump.txt

打印文件中的所有可打印字符串:

$ ronin strings /bin/ls

打印文件中的所有字母字符串:

$ ronin strings --alpha /bin/ls

打印文件中的所有字母数字字符串:

$ ronin strings --alpha-num /bin/ls

打印文件中的所有数字字符串:

$ ronin strings --numeric /bin/ls

从文件打印所有十六进制字符串:

$ ronin strings --hex /bin/ls

枚举域名的所有位翻转:

$ ronin bitflip microsoft --alpha-num --append .com

licrosoft.com

oicrosoft.com

iicrosoft.com

eicrosoft.com

Microsoft.com

mhcrosoft.com

mkcrosoft.com

mmcrosoft.com

macrosoft.com

mycrosoft.com

...

编码

Base64 编码字符串:

$ ronin encode --base64 --string "foo bar baz"
Zm9vIGJhciBiYXo=

Zlib 压缩、Base64 编码,然后 URI 编码字符串:

$ ronin encode --zlib --base64 --uri --string "foo bar"

%65%4A%78%4C%79%38%39%58%53%45%6F%73%41%67%41%4B%63%41%4B%61%0A

Base64 解码字符串:

$ ronin decode --base64 --string "Zm9vIGJhciBiYXo="

foo bar baz

URI 解码、Base64 解码,然后 zlib 膨胀字符串:

$ ronin decode --uri --base64 --zlib --string "%65%4A%78%4C%79%38%39%58%53%45%6F%73%41%67%41%4B%63%41%4B%61%0A"

foo bar

URI 转义字符串:

$ ronin escape --uri --string "foo bar"

foo%20bar

URI 取消转义字符串:

$ ronin unescape --uri --string "foo%20bar"

foo bar

将文件转换为带引号的 C 字符串:

$ ronin quote --c file.bin

"..."

将文件转换为带引号的 JavaScript 字符串:

$ ronin quote --js file.bin

取消引用 C 字符串:

$ ronin unquote --c --string '"\x66\x6f\x6f\x20\x62\x61\x72"'

foo bar

文本

从文件中提取高熵数据:

$ ronin entropy -e 5.0 index.html

Grep 查找常见的数据模式:

$ ronin grep --hash index.html

从数据中提取常见模式:

$ ronin extract --hash index.html

生成一个单词的随机拼写错误:

$ ronin typo microsoft

microssoft

列举单词的每个拼写错误变体:

$ ronin typo --enum microsoft

microosoft

microsooft

microssoft

生成一个单词的随机同形文字版本:

$ ronin homoglyph CEO

CEO

枚举单词的每个同形异义词变体:

$ ronin homoglyph --enum CEO

ϹEO

СEO

ⅭEO

CEO

CΕO

CЕO

CEO

CEΟ

CEО

CEO

语法高亮显示文件:

$ ronin highlight index.html

加密

AES-256 加密文件:

$ ronin encrypt --cipher aes-256-cbc --password "..." file.txt > encrypted.bin

解密数据:

$ ronin decrypt --cipher aes-256-cbc --password "..." encrypted.bin

为文件生成 HMAC:

$ ronin hmac --hash sha1 --password "too many secrets" data.txt

为字符串生成 HMAC:

$ ronin hmac --hash sha1 --password "too many secrets" --string "..."

计算字符串的 MD5 校验和:

$ ronin md5 --string "hello world"

5eb63bbbe01eeed093cb22bb8f5acdc3

计算文件的 MD5 校验和:

$ ronin md5 file.txt

计算文件中每一行的 MD5 校验和:

$ ronin md5 --multiline file.txt

计算字符串的 SHA1 校验和:

$ ronin sha1 --string "hello world"

2aae6c35c94fcfb415dbe95f408b9ce91ee846ed

计算文件的 SHA1 校验和:

$ ronin sha1 file.txt

计算文件中每一行的 SHA1 校验和:

$ ronin sha1 --multiline file.txt

计算字符串的 SHA256 校验和:

$ ronin sha256 --string "hello world"

b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

计算文件的 SHA256 校验和:

$ ronin sha256 file.txt

计算文件中每一行的 SHA256 校验和:

$ ronin sha256 --multiline file.txt

计算字符串的 SHA512 校验和:

$ ronin sha512 --string "hello world"

309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f

计算文件的 SHA512 校验和:

$ ronin sha512 file.txt

计算文件中每一行的 SHA512 校验和:

$ ronin sha512 --multiline file.txt

ROT-13 编码字符串:

$ ronin rot --string "The quick brown fox jumps over the lazy dog"

Gur dhvpx oebja sbk whzcf bire gur ynml qbt

XOR 编码字符串:

$ ronin xor --key ABC --string "The quick brown fox jumps over the lazy dog"

"\x15*&a36(!(a 1.5-a$,9b)4/32b,7'1a6+$b/ 8:a&,&"

联网

查询 IP 地址的 ASN:

$ ronin asn -I 4.2.2.1

4.0.0.0/9 AS3356 (US) LEVEL3

获取系统的外部/公共 IP 地址:

$ ronin ip --public

将 IP 地址转换为十进制格式:

$ ronin ip --decimal 127.0.0.1

2130706433

将 IP 地址文件转换为 URL:

$ ronin ip --file targets.txt --http

枚举 IP CIDR 范围内的每个 IP 地址:

$ ronin iprange 10.1.0.0/15

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

10.0.0.5

10.0.0.6

10.0.0.7

10.0.0.8

10.0.0.9

...

枚举 IP 全局范围内的每个 IP 地址:

$ ronin iprange 10.1-3.0.*

10.1.0.1

10.1.0.2

10.1.0.3

10.1.0.4

10.1.0.5

10.1.0.6

10.1.0.7

10.1.0.8

10.1.0.9

10.1.0.10

...

枚举两个 IP 地址之间的每个 IP 地址:

$ ronin iprange --start 10.0.0.1 --stop 10.0.3.33

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

10.0.0.5

10.0.0.6

10.0.0.7

10.0.0.8

10.0.0.9

10.0.0.10

连接到远程 TCP 服务:

$ ronin netcat -v example.com 80

监听本地 TCP 端口:

$ ronin netcat -v -l 1337

连接到远程 SSL/TLS 服务:

$ ronin netcat -v --ssl example.com 443

连接到远程 UDP 服务:

$ ronin netcat -v -u example.com 1337

监听本地 UDP 端口:

$ ronin netcat -v -u -l 1337

打开 UNIX 套接字:

$ ronin netcat -v --unix /path/to/unix.socket

十六进制转储从套接字接收到的所有数据:

$ ronin netcat --hexdump example.com 80

GET / HTTP/1.1

Host: example.com

User-Agent: Ruby

00000000  48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d  |HTTP/1.1 200 OK.|

00000010  0a 41 67 65 3a 20 32 35 30 38 30 36 0d 0a 43 61  |.Age: 250806..Ca|

00000020  63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 78  |che-Control: max|

00000030  2d 61 67 65 3d 36 30 34 38 30 30 0d 0a 43 6f 6e  |-age=604800..Con|

00000040  74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f  |tent-Type: text/|

00000050  68 74 6d 6c 3b 20 63 68 61 72 73 65 74 3d 55 54  |html; charset=UT|

...

许可证协议

本项目的开发与发布遵循GPL-3.0开源许可协议。

项目地址

Ronin:【GitHub传送门

参考资料

https://ronin-rb.dev/

https://www.ruby-lang.org/

# ruby # 开源 # 开源安全工具 # 安全研究 # 安全开发
免责声明
1.一般免责声明:本文所提供的技术信息仅供参考,不构成任何专业建议。读者应根据自身情况谨慎使用且应遵守《中华人民共和国网络安全法》,作者及发布平台不对因使用本文信息而导致的任何直接或间接责任或损失负责。
2. 适用性声明:文中技术内容可能不适用于所有情况或系统,在实际应用前请充分测试和评估。若因使用不当造成的任何问题,相关方不承担责任。
3. 更新声明:技术发展迅速,文章内容可能存在滞后性。读者需自行判断信息的时效性,因依据过时内容产生的后果,作者及发布平台不承担责任。
本文为 Alpha_h4ck 独立观点,未经授权禁止转载。
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
Alpha_h4ck LV.10
好好学习,天天向上
  • 2359 文章数
  • 1023 关注者
Tetragon:一款基于eBPF的运行时环境安全监控工具
2025-01-21
DroneXtract:一款针对无人机的网络安全数字取证工具
2025-01-21
CNAPPgoat:一款针对云环境的安全实践靶场
2025-01-21
文章目录