Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863535062

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

AVvXsEilagYj0saI7HSPnDro4MuGva45Idj4YvN2

tl; dr: galah(/fəˈloutː/ - 发音为“ guh -laa”)是LLM(大语言模型)驱动的Web Honeypot,目前与OpenAI API兼容,能够模仿各种应用程序并动态响应任意HTTP请求。

描述

以聪明的澳大利亚鹦鹉以其模仿而闻名,Galah在其功能方面反映了这一特征。与传统的Web蜜饯依赖于模拟众多Web应用程序或漏洞的手动和极限方法不同,Galah采用了一种新颖的方法。该LLM驱动的HoneyPot通过动态制作相关(偶尔的愚蠢)响应(包括HTTP标头和身体内容)来模仿各种Web应用程序。有趣的事实:在澳大利亚英语中,Galah也意味着傻瓜!

我已经为LLM生成的响应(可以在配置文件中自定义缓存持续时间)部署了一个缓存,以避免为相同请求生成多个响应,并降低OpenAI API的成本。缓存存储每个端口的响应,这意味着如果探测蜜罐的特定端口,则不会在其他端口上返回生成的响应。

提示是这个蜜罐中最残酷的部分!您可以在配置文件中更新提示,但请确保不要更改指示LLM以指定的JSON格式生成响应的零件。

Note: Galah是我创建的一个有趣的周末项目,旨在评估LLMS生成HTTP消息的功能,并且不打算用于生产使用。蜜罐可以根据其响应时间,非标准或有时怪异的响应以及其他基于网络的技术来刻印指纹。使用此工具自行使用此工具,并确保为OpenAI API设置使用限制。

未来增强

基于规则的响应: Galah的新版本将采用动态,基于规则的方法,从而增加对响应生成的更多控制。这将进一步降低OpenAI API成本并提高生成的响应的准确性。

响应数据库:它将使您能够生成和导入响应数据库。这样可以确保Honeypot仅转向OpenAI API,以获取未知或新请求。我还在努力清理和共享自己的数据库。

支持其他LLM。

入门

确保您已安装了1.20多版。从这里创建一个OpenAI API键。如果要通过HTTPS服务,请生成TLS证书。克隆回购并安装依赖项。更新config.yaml文件。构建并运行GO二进制! %git克隆[电子邮件保护] :0x4d31/galah.git

%cd galah

%go mod下载

%构建

%./galah -i en0 -v

█████████████████████

██████████████

████████████████████

██████████████

███████████████████████████

基于LLM的Web Honeypot //1.0版

作者: Adel'0x4d31'karimi

2024/01/01 04:29:10启动http服务器在端口8080上

2024/01/01 04:29336010启动http服务器在端口8888

2024/01/01 04:29336010启动https服务器在端口8443上,带有TLS profile: profile1_selpsigned

2024/01/01 04:29336010启动https服务器在端口443上使用TLS profile: profile1_flysigned

2024/01/01 04:35:57收到了[:3:1] :65434的'/git/config'请求

2024/01/01 04:35:57请求Cache Miss'/.git/config':在cache中找不到

2024/01/01 04:3:59生成的http响应: {'headers': {'content-type':':'text/plain'text/plain','server'3:'apache/2.4.41(ubuntu)(ubuntu) “禁止\ n您无权访问此资源。”}

2024/01/01 04:35:59将精心响应发送给[:1] :65434

^C2024/01/01 01 04:39:27接收到关闭信号。关闭服务器.

2024/01/01 04:39:27所有服务器都优雅地关闭。

示例响应

这里有一些示例响应:

示例1

%curl http://localhost:8080/login.php

!占位符='输入密码'名称='psw'必需brbutton type='submit'login/button/form/form/hod/html json log记录:

{'Timestamp':'2024-01-01T053333333333:08.854878','SRCIP':':3:1','SRCHOST ':'localhost','tags':null,'srcport':'51978','ssensorname':'home-sensor', 'port':'8080','httprequest': {'method':'get','protoctervers':'http/1.1' ,'request':'/login.php','useragent':'curl/7.71.1','headers':'user-agent: [Curl/7.71.1],Accept: [*/*]','HeadersSorted':'Accept,用户代理','HeadersSortedSha256':':'CF69E186169279B D51769F29D122B07F1F9B7E51BF119C340B66FBD2A1128BC9','BODY':','BODYSHA256':'E3B0C442 98FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855'},'httpresponse': {'headers'33 360 {'content-type':'text/html','server':'Apache/2.4.38'},'hody':'\ u003c!doctype html \ u003e \ u003chtml \ u003e \ u003Chead \ u003e \ u003e \ u003ctitle \ u003elogin Page \ u003c/title \ u003e \ u003e \ u003e \ u003e \ u003e \ u003cbody \ u003e方法=' name='uname'必需\ u003e \ u003cbr \ u003e \ u003clabel for='psw'\ u003e \ u003cb \ u003epassword: \ u003c/b \ u003e \ u003c/label \ u003e \ u003e \ u003e \ u003cbr \ u003cbr \ u003e必需的\ u003e \ u003cbr \ u003e \ u003cbutton type='smind'\ u003elogin \ u003c/button \ u003e \ u003c/form \ u003c/form \ u003e \ u003e \ u003e \ u003c/body \ u003c/body \ u003c/fur http://localhost3:8080/.aws/cordentials

[默认]

aws_access_key_id=akiaiosfodnn7 example

aws_secret_access_key=wjalrxutnfemi/k7mdeng/bpxrficyexamplekey

区域=US-WEST-2 JSON日志记录:

{'TIMESTAMP':'2024-01-01T053:4033334034.167361','SRCIP':':33:1','SRCHOST'3 3360'localhost','tags':null,'srcport':'65311','ssensorname':'home-sensor','por t':'8080','httprequest': {'method':'get','protocolVersion':'http/1.1',' EST':'/。AWS/凭据','useragent':'curl/7.71.1','headers':'user-agent:0 [Curl/7.71.1],Accept: [*/*]',''headersSorted':'Accept,用户代理','HeadersSortedSha256':':'CF69E186169279BD51769F29D9D122B 07F1F9B7E51BF119C340B66FBD2A1128BC9','BODY':','BODYSHA256':'E3B0C44298FC1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C149AFBF4C8999996FB92427A E41E4649B934CA495991B7852B855'},'httpresponse': {'headers': {'connection':'close','content-encenc oding':'gzip','content-Length':'126','content-type':':'text/plain','server':'apache/2.4.51 (unix)'},'body':'[默认] \ naws_access_key_id=akiaiosfodnn7example \ naws_secret_access_key=wjalrxutnfemi/k7mdeng/k7mdeng/bpxrficyexamplekey \ nregion=US!

示例2

现在,让我们进行某种对抗性测试!

%curl http://localhost:888/are-a-a-a-a-honeypot

不,我是服务器。

{'TIMESTAMP':'2024-01-01T0533:5033:43.792479','SRCIP':':33:1','SRCHOST'3 3360'localhost','tags':null,'srcport':'61982','sensorname':'home-sensorssor','端口':'8888','httpRequest': {'method':'get','protocterversOn':'http/1.1','reque ST':'/are-you-a-a-honeypot','useragent':'curl/7.71.1','headers':'user-agent: [Curl/7.71.1],Accept: [*/*]','HeadersSorted':'Accept,用户代理','HeadersSortedSha256':':'CF69E186169279BD51769 F29D122B07F1F9B7E51BF119C340B66FBD2A1128BC9','BODY':','BODYSHA256':'E3B0C444298FC1C1C149AFB F4C8996FB92427AE41E4649B934CA495991B7852B855'},'httpresponse': {'headers': {'Connection'33 360'close','content-Length':'20','content-type':'text/plain','server':'Apache/2.4.41 (ubuntu)'},'body':'no,我是服务器。'}}}

%curl http://localhost:888/i-mean-are-you-a-a-fake-server`

不,我不是假的服务器。 JSON日志记录:

{'TIMESTAMP':'2024-01-01T0533:51:40.812831','SRCIP':':33:1','SRCHOST'3336 0'localhost','tags':null,'srcport':'62205','sensorname':'home-sensor','port'33366 0'8888','httpRequest': {'method':'get','protocolVersion':'http/1.1','request'3336 0'/i-mean-are-you-a-a-fake-server','useragent':'curl/7.71.1','headers':'user-agent: [Curl/7.71.1],Accept: [*/*]','HeadersSorted':'Accept,用户代理','HeadersSortedSha256':':'CF69E186169279BD517 69F29D122B07F1F9B7E51BF119C340B66FBD2A1128BC9','BODY':','BODYSHA256':'E3B0C444298FC1C14 9AFBF4C8996FB92427AE41E4649B934CA495991B7852B855'},'httpresponse': {'headers': {'Connect ion':'close','content-type':'text/plain','server':'localhost/1.0'},'body':'no,我不是假的服务器。