mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e4ca84589b | |||
31f5ca9cb1 | |||
c6855e8511 |
28
README.md
28
README.md
@ -31,6 +31,18 @@ Unit Test:
|
|||||||
$ go test ./...
|
$ go test ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- OpenAPI ChatBot GPT-3 integration
|
||||||
|
- SSH Honeypot
|
||||||
|
- HTTP Honeypot
|
||||||
|
- TCP Honeypot
|
||||||
|
- Easy to create a new strategy
|
||||||
|
- Easy to extend event tracking logic
|
||||||
|
- Strong code quality
|
||||||
|
- Docker
|
||||||
|
- RabbitMQ integration
|
||||||
|
|
||||||
## Example configuration service
|
## Example configuration service
|
||||||
|
|
||||||
The configurations are inside the /configurations/services directory, just add a new file for each service/port.
|
The configurations are inside the /configurations/services directory, just add a new file for each service/port.
|
||||||
@ -95,7 +107,7 @@ address: ":2222"
|
|||||||
description: "SSH interactive ChatGPT"
|
description: "SSH interactive ChatGPT"
|
||||||
commands:
|
commands:
|
||||||
- regex: "^(.+)$"
|
- regex: "^(.+)$"
|
||||||
plugin: "OpenAIChatGPT"
|
plugin: "OpenAIGPTLinuxTerminal"
|
||||||
serverVersion: "OpenSSH"
|
serverVersion: "OpenSSH"
|
||||||
serverName: "ubuntu"
|
serverName: "ubuntu"
|
||||||
passwordRegex: "^(root|qwerty|Smoker666|123456|jenkins|minecraft|sinus|alex|postgres|Ly123456)$"
|
passwordRegex: "^(root|qwerty|Smoker666|123456|jenkins|minecraft|sinus|alex|postgres|Ly123456)$"
|
||||||
@ -136,18 +148,6 @@ deadlineTimeoutSeconds: 60
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- OpenAPI ChatBot GPT-3 integration
|
|
||||||
- SSH Honeypot
|
|
||||||
- HTTP Honeypot
|
|
||||||
- TCP Honeypot
|
|
||||||
- Easy to create a new strategy
|
|
||||||
- Easy to extend event tracking logic
|
|
||||||
- Strong code quality
|
|
||||||
- Docker
|
|
||||||
- RabbitMQ integration
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- telnet
|
- telnet
|
||||||
@ -173,3 +173,5 @@ Happy hacking!
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under [GNU GPL 3 License](LICENSE).
|
This project is licensed under [GNU GPL 3 License](LICENSE).
|
||||||
|
|
||||||
|
[](https://www.paypal.com/donate/?business=P75FH5LXKQTAC&no_recurring=0¤cy_code=EUR)
|
||||||
|
@ -4,7 +4,7 @@ address: ":2222"
|
|||||||
description: "SSH interactive ChatGPT"
|
description: "SSH interactive ChatGPT"
|
||||||
commands:
|
commands:
|
||||||
- regex: "^(.+)$"
|
- regex: "^(.+)$"
|
||||||
plugin: "OpenAIChatGPT"
|
plugin: "OpenAIGPTLinuxTerminal"
|
||||||
serverVersion: "OpenSSH"
|
serverVersion: "OpenSSH"
|
||||||
serverName: "ubuntu"
|
serverName: "ubuntu"
|
||||||
passwordRegex: "^(root|qwerty|Smoker666|123456|jenkins|minecraft|sinus|alex|postgres|Ly123456)$"
|
passwordRegex: "^(root|qwerty|Smoker666|123456|jenkins|minecraft|sinus|alex|postgres|Ly123456)$"
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const ChatGPTPluginName = "OpenAIChatGPT"
|
const ChatGPTPluginName = "OpenAIGPTLinuxTerminal"
|
||||||
const openAIGPTEndpoint = "https://api.openai.com/v1/completions"
|
const openAIGPTEndpoint = "https://api.openai.com/v1/completions"
|
||||||
|
|
||||||
type History struct {
|
type History struct {
|
||||||
@ -59,12 +59,12 @@ type gptRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Reference: https://www.engraved.blog/building-a-virtual-machine-inside/
|
//Reference: https://www.engraved.blog/building-a-virtual-machine-inside/
|
||||||
const chatGPTFirstQuestion = "I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so.\n\nA:pwd\n\nQ:/home/user\n\n"
|
const promptVirtualizeLinuxTerminal = "I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so.\n\nA:pwd\n\nQ:/home/user\n\n"
|
||||||
|
|
||||||
func buildPrompt(histories []History, command string) string {
|
func buildPrompt(histories []History, command string) string {
|
||||||
var sb strings.Builder
|
var sb strings.Builder
|
||||||
|
|
||||||
sb.WriteString(chatGPTFirstQuestion)
|
sb.WriteString(promptVirtualizeLinuxTerminal)
|
||||||
|
|
||||||
for _, history := range histories {
|
for _, history := range histories {
|
||||||
sb.WriteString(fmt.Sprintf("A:%s\n\nQ:%s\n\n", history.Input, history.Output))
|
sb.WriteString(fmt.Sprintf("A:%s\n\nQ:%s\n\n", history.Input, history.Output))
|
||||||
|
Reference in New Issue
Block a user