diff --git a/modules/encoders/hash/md5_file/manifests/.no_puppet b/modules/encoders/hash/md5_file/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/md5_file/md5_file.pp b/modules/encoders/hash/md5_file/md5_file.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/md5_file/secgen_local/local.rb b/modules/encoders/hash/md5_file/secgen_local/local.rb new file mode 100644 index 000000000..4d97cb99d --- /dev/null +++ b/modules/encoders/hash/md5_file/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class MD5Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(file_path) + Digest::MD5.file file_path + end + +end + +MD5Encoder.new.run diff --git a/modules/encoders/hash/md5_file/secgen_metadata.xml b/modules/encoders/hash/md5_file/secgen_metadata.xml new file mode 100644 index 000000000..16ab03493 --- /dev/null +++ b/modules/encoders/hash/md5_file/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + MD5 hash encoder file + Jason Keighley + Apache v2 + MD5 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/md5_string/manifests/.no_puppet b/modules/encoders/hash/md5_string/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/md5_string/md5_string.pp b/modules/encoders/hash/md5_string/md5_string.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/md5_string/secgen_local/local.rb b/modules/encoders/hash/md5_string/secgen_local/local.rb new file mode 100644 index 000000000..4d73161fa --- /dev/null +++ b/modules/encoders/hash/md5_string/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class MD5Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(str) + Digest::MD5.base64digest str + end + +end + +MD5Encoder.new.run diff --git a/modules/encoders/hash/md5_string/secgen_metadata.xml b/modules/encoders/hash/md5_string/secgen_metadata.xml new file mode 100644 index 000000000..1d03453cd --- /dev/null +++ b/modules/encoders/hash/md5_string/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + MD5 hash encoder string + Jason Keighley + Apache v2 + MD5 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha1_file/manifests/.no_puppet b/modules/encoders/hash/sha1_file/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha1_file/secgen_local/local.rb b/modules/encoders/hash/sha1_file/secgen_local/local.rb new file mode 100644 index 000000000..cd8df4d70 --- /dev/null +++ b/modules/encoders/hash/sha1_file/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class MD5Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(file_path) + Digest::SHA1.file file_path + end + +end + +MD5Encoder.new.run diff --git a/modules/encoders/hash/sha1_file/secgen_metadata.xml b/modules/encoders/hash/sha1_file/secgen_metadata.xml new file mode 100644 index 000000000..206508bfa --- /dev/null +++ b/modules/encoders/hash/sha1_file/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + SHA1 hash encoder file + Jason Keighley + Apache v2 + SHA1 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha1_file/sha1_file.pp b/modules/encoders/hash/sha1_file/sha1_file.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha1_string/manifests/.no_puppet b/modules/encoders/hash/sha1_string/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha1_string/secgen_local/local.rb b/modules/encoders/hash/sha1_string/secgen_local/local.rb new file mode 100644 index 000000000..0cfb7de4e --- /dev/null +++ b/modules/encoders/hash/sha1_string/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class SHA1Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(str) + Digest::SHA1.base64digest str + end + +end + +SHA1Encoder.new.run diff --git a/modules/encoders/hash/sha1_string/secgen_metadata.xml b/modules/encoders/hash/sha1_string/secgen_metadata.xml new file mode 100644 index 000000000..facabd2e8 --- /dev/null +++ b/modules/encoders/hash/sha1_string/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + SHA1 hash encoder string + Jason Keighley + Apache v2 + SHA1 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha1_string/sha1_string.pp b/modules/encoders/hash/sha1_string/sha1_string.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha256_string/manifests/.no_puppet b/modules/encoders/hash/sha256_string/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha256_string/secgen_local/local.rb b/modules/encoders/hash/sha256_string/secgen_local/local.rb new file mode 100644 index 000000000..44a1acc5b --- /dev/null +++ b/modules/encoders/hash/sha256_string/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class SHA256Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(str) + Digest::SHA256.base64digest str + end + +end + +SHA256Encoder.new.run diff --git a/modules/encoders/hash/sha256_string/secgen_metadata.xml b/modules/encoders/hash/sha256_string/secgen_metadata.xml new file mode 100644 index 000000000..d70d4f0be --- /dev/null +++ b/modules/encoders/hash/sha256_string/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + SHA256 hash encoder string + Jason Keighley + Apache v2 + SHA256 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha256_string/sha256_string.pp b/modules/encoders/hash/sha256_string/sha256_string.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha384_string/manifests/.no_puppet b/modules/encoders/hash/sha384_string/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha384_string/secgen_local/local.rb b/modules/encoders/hash/sha384_string/secgen_local/local.rb new file mode 100644 index 000000000..72398f9cc --- /dev/null +++ b/modules/encoders/hash/sha384_string/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class SHA256Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(str) + Digest::SHA384.base64digest str + end + +end + +SHA256Encoder.new.run diff --git a/modules/encoders/hash/sha384_string/secgen_metadata.xml b/modules/encoders/hash/sha384_string/secgen_metadata.xml new file mode 100644 index 000000000..76da3e080 --- /dev/null +++ b/modules/encoders/hash/sha384_string/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + SHA384 hash encoder string + Jason Keighley + Apache v2 + SHA384 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha384_string/sha384_string.pp b/modules/encoders/hash/sha384_string/sha384_string.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha512_string/manifests/.no_puppet b/modules/encoders/hash/sha512_string/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/sha512_string/secgen_local/local.rb b/modules/encoders/hash/sha512_string/secgen_local/local.rb new file mode 100644 index 000000000..743e66f64 --- /dev/null +++ b/modules/encoders/hash/sha512_string/secgen_local/local.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class SHA512Encoder < StringEncoder + def initialize + super + self.module_name = 'MD5 hash' + end + + def encode(str) + Digest::SHA2.new(512).base64digest str + end + +end + +SHA512Encoder.new.run diff --git a/modules/encoders/hash/sha512_string/secgen_metadata.xml b/modules/encoders/hash/sha512_string/secgen_metadata.xml new file mode 100644 index 000000000..2a8c10c8f --- /dev/null +++ b/modules/encoders/hash/sha512_string/secgen_metadata.xml @@ -0,0 +1,17 @@ + + + + SHA512 hash encoder string + Jason Keighley + Apache v2 + SHA512 hash encoder module + + hash + windows + + strings_to_encode + + hash + diff --git a/modules/encoders/hash/sha512_string/sha512_string.pp b/modules/encoders/hash/sha512_string/sha512_string.pp new file mode 100644 index 000000000..e69de29bb diff --git a/scenarios/simple_examples/forensic_examples/simple_encoders_example_scenario.xml b/scenarios/simple_examples/forensic_examples/simple_encoders_example_scenario.xml new file mode 100644 index 000000000..3f495bcac --- /dev/null +++ b/scenarios/simple_examples/forensic_examples/simple_encoders_example_scenario.xml @@ -0,0 +1,48 @@ + + + + + + + windows_server + + + + + C:\Users\vagrant\Desktop\Hash_file + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + + + + + diff --git a/scenarios/windows_scenario.xml b/scenarios/windows_scenario.xml index d0cfbe195..95c45ac4f 100644 --- a/scenarios/windows_scenario.xml +++ b/scenarios/windows_scenario.xml @@ -6,10 +6,48 @@ - storage_server + windows_server - + + + + + HKLM\System\CurrentControlSet\Services\Puppet + + + + string + + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + + + String to demonstrate the module + + + +