Antistring (#44)

* updates to rco_utils to support api hashing

* version bumps, feature adjustments

* fix tcp cargo

* make the functions public

* hash params done

* add antisand as an optional feature of tcp_reverse shell

* fix links in comments

* lots of cleanup on tcp_reverse_shell

* clippy recommendation

* fully de-stringed version is complete, but gotta figure out how i want to toggle them

* all changes to support antisand and antistring complete!

* antisand and antistring were incompatible because of imports; fixed that. also there is a new implementation of antisand with antistring applied

* antistring support for process hollowing

* antistring updates for process migration

* lock updatrer

* i think this covers the builds needed

* new tool

* readme updates

* more readme updates

* Update README.md

* Update README.md

* Update reverse shell badge data via Github Action

* Update process migration badge data via Github Action

* Update process hollowing badge data via Github Action

* trying a new workflow trigger

* undoing, didnt work the way i wanted it to

Co-authored-by: kmanc <kmanc@users.noreply.github.com>
This commit is contained in:
kmanc
2022-04-22 11:18:26 -07:00
committed by GitHub
parent 8af8caf75e
commit 038fa0ebc6
28 changed files with 838 additions and 109 deletions
+12
View File
@@ -0,0 +1,12 @@
[package]
name = "hash_params"
version = "1.0.0"
edition = "2021"
authors = ["Kevin Conley <koins@duck.com>"]
rust-version = "1.59"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rco_config = {path = "../rco_config"}
rco_utils = {path = "../rco_utils", features = ["antistring"] }
+26
View File
@@ -0,0 +1,26 @@
# RCO: Hash Params
[![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fkmanc%2Fremote_code_oxidation%2Fmaster%2F.custom_shields%2Fhash_params.json)](https://github.com/kmanc/remote_code_oxidation/tree/master/hash_params)
![gif](https://user-images.githubusercontent.com/14863147/164768272-9b010714-6b81-42d1-9caf-d08324827959.gif)
## How it works
Hash params performs Rust's default hash algorithm ([SipHash-1-3 at the time of this writing](https://en.wikipedia.org/wiki/SipHash)) on command line arguments and prints their output in hex. This should not be considered cryptographically secure, but works for obfuscating a value in a repeatable way.
## Using it
1. [Not shown in GIF] Compile the executable
#### For Linux
```commandline
cargo build -p hash_params --release
```
#### For Windows
```commandline
cargo build --target x86_64-pc-windows-gnu -p hash_params --release
```
2. Run the executable with the desired hash targets
+9
View File
@@ -0,0 +1,9 @@
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
for arg in args[1..].iter() {
let hashed = rco_utils::calculate_hash(arg);
println!("{arg} --> {hashed:x}");
}
}