Skip to content

Commit

Permalink
Optimize AES key
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemmy1228 committed Nov 8, 2023
1 parent 9c23f86 commit a4750b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/post/windows/gather/credentials/plsql_developer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def decrypt_str_aes(str)

cipher = OpenSSL::Cipher.new('aes-256-cfb8')
cipher.decrypt
cipher.key = "\x9C\x1C\xEE\xF3\x8A\x3A\x24\x86\x0C\x3D\x2E\x85\xD2\x9E\x7A\x70\x34\xC1\xD8\x5F\x9C\x1C\xEE\xF3\x8A\x3A\x24\x86\x0C\x3D\x2E\x85"
hash = Digest::SHA1.digest('PL/SQL developer + Oracle 11.0.x')
cipher.key = hash + hash[0..11]
cipher.iv = bytes[0..7] + "\x00" * 8

return cipher.update(bytes[8..]) + cipher.final
Expand Down

0 comments on commit a4750b1

Please sign in to comment.