Skip to content

Commit

Permalink
Update apache_nifi_credentials algo regex
Browse files Browse the repository at this point in the history
  • Loading branch information
h00die authored Jun 28, 2024
1 parent e691f72 commit eb0933f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/post/linux/gather/apache_nifi_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ def run
key = properties.scan(/^nifi.sensitive.props.key=(.+)$/).flatten.first.strip
fail_with(Failure::NotFound, 'Unable to find nifi.properties and/or flow.json.gz files') if key.nil?
print_good("Key: #{key}")
algorithm = properties.scan(/^nifi.sensitive.props.algorithm=(\w+)$/).flatten.first.strip
# https://rubular.com/r/N0w0WHTjjdKXHZ
# https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#property-encryption-algorithms
# https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#java-cryptography-extension-jce-limited-strength-jurisdiction-policies
algorithm = properties.scan(/^nifi.sensitive.props.algorithm=([\w-]+)$/).flatten.first.strip
fail_with(Failure::NotFound, 'Unable to find nifi.properties and/or flow.json.gz files') if algorithm.nil?

columns = ['Name', 'Username', 'Password', 'Other Information']
Expand Down

0 comments on commit eb0933f

Please sign in to comment.