● Notice //GitHub (@shehzade) is temporarily suspended pending an automated false-positive review. All tools are hosted on this Code Mirror and available on request (contact); GitHub links will return once reinstated.
PUBLIC MIRRORGo v1.0

Multi-protocol network egress assessment and DLP verification framework featuring automated L4 sweeps, corporate proxy traversal, and covert protocol smuggling across 20+ channels.

$ git clone https://shehzade.io/repos/contraband.git Copy
Source ZIP (1.93 MB)
Code 174 Commits 1
contraband / pkg / client / stage_evasion.go
← Back to directory
30 lines · 1.0 KB
Raw
1package client
2
3import (
4 "strings"
5
6 "github.com/shehzade/contraband/pkg/client/evasion"
7)
8
9func runStage5Evasion(cfg ClientConfig, effectiveSeed int64) (*evasion.Pipeline, bool) {
10 pipeCfg := evasion.PipelineConfig{
11 Carrier: evasion.CarrierType(cfg.Stego),
12 Passphrase: cfg.Passphrase,
13 Seed: effectiveSeed,
14 Transforms: cfg.Transforms,
15 }
16 if strings.Contains(cfg.Transforms, "zstd") {
17 pipeCfg.Compression = evasion.CompressZstd
18 } else if strings.Contains(cfg.Transforms, "gzip") {
19 pipeCfg.Compression = evasion.CompressGzip
20 } else if strings.Contains(cfg.Transforms, "zlib") {
21 pipeCfg.Compression = evasion.CompressZlib
22 }
23 if strings.Contains(cfg.Transforms, "aes") || cfg.Passphrase != "" {
24 pipeCfg.Encrypt = true
25 }
26
27 pipeline, pipeErr := evasion.NewPipeline(pipeCfg)
28 hasEvasion := pipeErr == nil && pipeline != nil && (pipeCfg.Compression != evasion.CompressNone || pipeCfg.Encrypt || pipeCfg.Carrier != "" || (pipeCfg.Transforms != "" && pipeCfg.Transforms != "raw" && pipeCfg.Transforms != "none"))
29 return pipeline, hasEvasion
30}