mirror of
https://github.com/MythicC2Profiles/http
synced 2026-06-08 11:56:36 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c3b8ade832 | |||
| bc2238ae50 | |||
| 60062ebdae | |||
| 1e15fe3d03 | |||
| f0a5457a85 | |||
| 65d50c6a8e | |||
| 1ec59eb1b6 | |||
| 1b53c59fd4 | |||
| a362a4a1a0 |
@@ -1,4 +1,4 @@
|
||||
FROM itsafeaturemythic/mythic_go_base:latest as builder
|
||||
FROM golang:1.21 as builder
|
||||
|
||||
WORKDIR /Mythic/
|
||||
|
||||
|
||||
@@ -1 +1,20 @@
|
||||
FROM ghcr.io/mythicc2profiles/http:v0.0.1-rc1
|
||||
FROM golang:1.21 as builder
|
||||
|
||||
WORKDIR /Mythic/
|
||||
|
||||
COPY [".", "."]
|
||||
|
||||
RUN make build
|
||||
|
||||
FROM alpine
|
||||
|
||||
RUN apk add make
|
||||
|
||||
COPY --from=builder /main /main
|
||||
COPY --from=builder /mythic_http_server /mythic_http_server
|
||||
|
||||
WORKDIR /Mythic/
|
||||
|
||||
COPY [".", "."]
|
||||
|
||||
CMD make run
|
||||
@@ -22,10 +22,13 @@ import (
|
||||
)
|
||||
|
||||
func Initialize(configInstance instanceConfig) *gin.Engine {
|
||||
if mythicConfig.MythicConfig.DebugLevel == "info" || mythicConfig.MythicConfig.DebugLevel == "warning" {
|
||||
if mythicConfig.MythicConfig.DebugLevel == "warning" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
} else {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
}
|
||||
r := gin.New()
|
||||
gin.DisableConsoleColor()
|
||||
// Global middleware
|
||||
r.Use(InitializeGinLogger(configInstance))
|
||||
// Recovery middleware recovers from any panics and writes a 500 if there was one.
|
||||
|
||||
@@ -440,7 +440,7 @@ var httpc2parameters = []c2structs.C2Parameter{
|
||||
DefaultValue: "https://domain.com",
|
||||
ParameterType: c2structs.C2_PARAMETER_TYPE_STRING,
|
||||
Required: true,
|
||||
VerifierRegex: "^(http|https):\\/\\/.*[^\\/]$",
|
||||
VerifierRegex: "^(http|https):\\/\\/[^\\/:]*$",
|
||||
},
|
||||
{
|
||||
Name: "get_uri",
|
||||
@@ -448,6 +448,7 @@ var httpc2parameters = []c2structs.C2Parameter{
|
||||
DefaultValue: "index",
|
||||
ParameterType: c2structs.C2_PARAMETER_TYPE_STRING,
|
||||
Required: false,
|
||||
VerifierRegex: "^[^\\/].*",
|
||||
},
|
||||
{
|
||||
Name: "post_uri",
|
||||
@@ -455,6 +456,7 @@ var httpc2parameters = []c2structs.C2Parameter{
|
||||
DefaultValue: "data",
|
||||
ParameterType: c2structs.C2_PARAMETER_TYPE_STRING,
|
||||
Required: false,
|
||||
VerifierRegex: "^[^\\/].*",
|
||||
},
|
||||
{
|
||||
Name: "query_path_name",
|
||||
@@ -462,7 +464,7 @@ var httpc2parameters = []c2structs.C2Parameter{
|
||||
DefaultValue: "q",
|
||||
ParameterType: c2structs.C2_PARAMETER_TYPE_STRING,
|
||||
Required: false,
|
||||
VerifierRegex: "^[^\\/]",
|
||||
VerifierRegex: "^[^\\/].*",
|
||||
},
|
||||
{
|
||||
Name: "proxy_host",
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@
|
||||
"exclude_documentation_c2": false,
|
||||
"exclude_agent_icons": false,
|
||||
"remote_images": {
|
||||
"http": "ghcr.io/mythicc2profiles/http:v0.0.1-rc1"
|
||||
"http": "ghcr.io/mythicc2profiles/http:v0.0.1.3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user