mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
ntlm and lm hashes
This commit is contained in:
0
modules/encoders/hash/lm/lm.pp
Normal file
0
modules/encoders/hash/lm/lm.pp
Normal file
0
modules/encoders/hash/lm/manifests/.no_puppet
Normal file
0
modules/encoders/hash/lm/manifests/.no_puppet
Normal file
16
modules/encoders/hash/lm/secgen_local/local.rb
Normal file
16
modules/encoders/hash/lm/secgen_local/local.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/ruby
|
||||
require_relative '../../../../../lib/objects/local_hash_encoder.rb'
|
||||
|
||||
class LMEncoder < HashEncoder
|
||||
def initialize
|
||||
super
|
||||
self.module_name = 'LM Hash Encoder'
|
||||
end
|
||||
|
||||
def hash_function(string)
|
||||
require 'smbhash'
|
||||
Smbhash.lm_hash(string)
|
||||
end
|
||||
end
|
||||
|
||||
LMEncoder.new.run
|
||||
22
modules/encoders/hash/lm/secgen_metadata.xml
Normal file
22
modules/encoders/hash/lm/secgen_metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
|
||||
<name>MD5 Encoder</name>
|
||||
<author>Thomas Shaw</author>
|
||||
<module_license>MIT</module_license>
|
||||
<description>Generates an MD5 hash for each of the strings.</description>
|
||||
|
||||
<type>hash</type>
|
||||
<type>md5</type>
|
||||
<platform>linux</platform>
|
||||
<platform>windows</platform>
|
||||
|
||||
<read_fact>strings_to_encode</read_fact>
|
||||
<read_fact>salt</read_fact>
|
||||
<read_fact>return_salts</read_fact>
|
||||
|
||||
<output_type>string</output_type>
|
||||
|
||||
</encoder>
|
||||
17
modules/encoders/hash/mysql_password/secgen_local/local.rb
Normal file
17
modules/encoders/hash/mysql_password/secgen_local/local.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/ruby
|
||||
require_relative '../../../../../lib/objects/local_hash_encoder.rb'
|
||||
|
||||
class MySQLPasswordHashEncoder < HashEncoder
|
||||
def initialize
|
||||
super
|
||||
self.module_name = 'MySQL Password Hash Encoder'
|
||||
self.strings_to_encode = ['right']
|
||||
end
|
||||
|
||||
def hash_function(string)
|
||||
require 'digest/sha1'
|
||||
"*" + Digest::SHA1.hexdigest(Digest::SHA1.digest(string)).upcase
|
||||
end
|
||||
end
|
||||
|
||||
MySQLPasswordHashEncoder.new.run
|
||||
23
modules/encoders/hash/mysql_password/secgen_metadata.xml
Normal file
23
modules/encoders/hash/mysql_password/secgen_metadata.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
|
||||
<name>MySQL Password Hash Encoder</name>
|
||||
<author>Thomas Shaw</author>
|
||||
<module_license>MIT</module_license>
|
||||
<description>Generates a MySQL password hash for each of the strings. '*' + sha1sum(sha1sum(password))</description>
|
||||
|
||||
<type>hash</type>
|
||||
<type>mysql</type>
|
||||
<type>mysql_password</type>
|
||||
<platform>linux</platform>
|
||||
<platform>windows</platform>
|
||||
|
||||
<read_fact>strings_to_encode</read_fact>
|
||||
<read_fact>salt</read_fact>
|
||||
<read_fact>return_salts</read_fact>
|
||||
|
||||
<output_type>string</output_type>
|
||||
|
||||
</encoder>
|
||||
0
modules/encoders/hash/ntlm/manifests/.no_puppet
Normal file
0
modules/encoders/hash/ntlm/manifests/.no_puppet
Normal file
0
modules/encoders/hash/ntlm/ntlm.pp
Normal file
0
modules/encoders/hash/ntlm/ntlm.pp
Normal file
16
modules/encoders/hash/ntlm/secgen_local/local.rb
Normal file
16
modules/encoders/hash/ntlm/secgen_local/local.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/ruby
|
||||
require_relative '../../../../../lib/objects/local_hash_encoder.rb'
|
||||
|
||||
class NTLMEncoder < HashEncoder
|
||||
def initialize
|
||||
super
|
||||
self.module_name = 'NTLM Hash Encoder'
|
||||
end
|
||||
|
||||
def hash_function(string)
|
||||
require 'smbhash'
|
||||
Smbhash.ntlm_hash(string)
|
||||
end
|
||||
end
|
||||
|
||||
NTLMEncoder.new.run
|
||||
22
modules/encoders/hash/ntlm/secgen_metadata.xml
Normal file
22
modules/encoders/hash/ntlm/secgen_metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
|
||||
<name>MD5 Encoder</name>
|
||||
<author>Thomas Shaw</author>
|
||||
<module_license>MIT</module_license>
|
||||
<description>Generates an MD5 hash for each of the strings.</description>
|
||||
|
||||
<type>hash</type>
|
||||
<type>md5</type>
|
||||
<platform>linux</platform>
|
||||
<platform>windows</platform>
|
||||
|
||||
<read_fact>strings_to_encode</read_fact>
|
||||
<read_fact>salt</read_fact>
|
||||
<read_fact>return_salts</read_fact>
|
||||
|
||||
<output_type>string</output_type>
|
||||
|
||||
</encoder>
|
||||
0
modules/encoders/hash/sha3/manifests/.no_puppet
Normal file
0
modules/encoders/hash/sha3/manifests/.no_puppet
Normal file
15
modules/encoders/hash/sha3/secgen_local/local.rb
Normal file
15
modules/encoders/hash/sha3/secgen_local/local.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/ruby
|
||||
require_relative '../../../../../lib/objects/local_hash_encoder.rb'
|
||||
|
||||
class SHA1Encoder < HashEncoder
|
||||
def initialize
|
||||
super
|
||||
self.module_name = 'SHA1 Encoder'
|
||||
end
|
||||
|
||||
def hash_function(string)
|
||||
Digest::SHA1.hexdigest(string)
|
||||
end
|
||||
end
|
||||
|
||||
SHA1Encoder.new.run
|
||||
22
modules/encoders/hash/sha3/secgen_metadata.xml
Normal file
22
modules/encoders/hash/sha3/secgen_metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
|
||||
<name>SHA1 Encoder</name>
|
||||
<author>Thomas Shaw</author>
|
||||
<module_license>MIT</module_license>
|
||||
<description>Generates an SHA1 hash for each of the strings.</description>
|
||||
|
||||
<type>hash</type>
|
||||
<type>sha1</type>
|
||||
<platform>linux</platform>
|
||||
<platform>windows</platform>
|
||||
|
||||
<read_fact>strings_to_encode</read_fact>
|
||||
<read_fact>salt</read_fact>
|
||||
<read_fact>return_salts</read_fact>
|
||||
|
||||
<output_type>string</output_type>
|
||||
|
||||
</encoder>
|
||||
0
modules/encoders/hash/sha3/sha3.pp
Normal file
0
modules/encoders/hash/sha3/sha3.pp
Normal file
Reference in New Issue
Block a user