pwn 0.4.905 → 0.4.907

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 209f9a7230d2b15c4b2a717fb960d6cef3cb66f46f80b7d1151ff30e1c55b608
4
- data.tar.gz: 6cd6685fd53e8f8a7203a219d4b9d85f56d8bd20a00506b5455a736996f02563
3
+ metadata.gz: fe78a4cdaa98fc3d5f8c27a93df730f0d6f868ed4c836eae301c14491e148e78
4
+ data.tar.gz: 7331f43b33095b76b3405ed41c0b731b013d304355c097f58cd11ef0ff1b2023
5
5
  SHA512:
6
- metadata.gz: 27a3448585dfdca17e883c3f6b0b0d7d3fc88e0620ecd7ddfdc95949cc36d17378283600dbe8d6fef2143e86efefac43d184089a422e9874d39ba7eda405b33d
7
- data.tar.gz: eb6a4f51147e0731c3236317f75b93454654234f16de80a95b63be9c2ce9fe5c7d58b56d0b4d3ce0dc1cf00b84b1510a1969e6dd82ee774577629cbaee01958b
6
+ metadata.gz: 29217fbd9e14fb93731c04ba41f543cbae4fc78cc0ba5dd021c5aa74ed7d9762fa0e8c16ce89ee81af21a8baddba9ffaab6e8fc0bf261647a495437f13d260b1
7
+ data.tar.gz: 6f912c186e3b7b8a5b5595b3125508314d385c4cd91c2925fb94208701ed3b6821887d1d44dcf07f0358247ab6f2173a2b87548ea2edbd0c1bd2bdf1e2c992b9
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.905]:001 >>> PWN.help
40
+ pwn[v0.4.907]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.905]:001 >>> PWN.help
55
+ pwn[v0.4.907]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -81,11 +81,18 @@ module PWN
81
81
  )
82
82
 
83
83
  ip_resp[:tls_avail] = tls_port_avail
84
+ ip_resp[:ca_issuer_uris] = false
84
85
  ip_resp[:cert_subject] = false
85
86
  ip_resp[:cert_issuer] = false
86
87
  ip_resp[:cert_serial] = false
88
+ ip_resp[:crl_uris] = false
89
+ ip_resp[:extensions] = false
87
90
  ip_resp[:not_before] = false
88
91
  ip_resp[:not_after] = false
92
+ ip_resp[:oscsp_uris] = false
93
+ ip_resp[:pem] = false
94
+ ip_resp[:signature_algorithm] = false
95
+ ip_resp[:version] = false
89
96
  next unless tls_port_avail
90
97
 
91
98
  cert_obj = PWN::Plugins::Sock.get_tls_cert(
@@ -95,11 +102,18 @@ module PWN
95
102
 
96
103
  next unless cert_obj.is_a?(OpenSSL::X509::Certificate)
97
104
 
105
+ ip_resp[:ca_issuer_uris] = cert_obj.ca_issuer_uris.to_s
98
106
  ip_resp[:cert_subject] = cert_obj.subject.to_s
99
107
  ip_resp[:cert_issuer] = cert_obj.issuer.to_s
100
108
  ip_resp[:cert_serial] = cert_obj.serial.to_s
109
+ ip_resp[:crl_uris] = cert_obj.crl_uris.to_s
110
+ ip_resp[:extensions] = cert_obj.extensions.map { |ext| ext.to_s }
101
111
  ip_resp[:not_before] = cert_obj.not_before.to_s
102
112
  ip_resp[:not_after] = cert_obj.not_after.to_s
113
+ ip_resp[:oscsp_uris] = cert_obj.ocsp_uris.to_s
114
+ ip_resp[:pem] = cert_obj.to_pem.to_s
115
+ ip_resp[:signature_algorithm] = cert_obj.signature_algorithm.to_s
116
+ ip_resp[:version] = cert_obj.version.to_s
103
117
  end
104
118
  end
105
119
 
@@ -30,11 +30,6 @@ module PWN
30
30
  tls ||= false
31
31
 
32
32
  tls_min_version = OpenSSL::SSL::TLS1_VERSION if tls_min_version.nil?
33
- # tls_version Values can be Displayed via:
34
- # OpenSSL::SSL::SSLContext::METHODS
35
- # tls_version = 'TLSv1' if tls_version.nil?
36
- # tls_version = nil if tls_min_version == OpenSSL::SSL::TLS1_3_VERSION
37
- # cipher_tls = 'TLSv1.0' if cipher_tls.nil?
38
33
 
39
34
  case protocol
40
35
  when :tcp
@@ -42,10 +37,10 @@ module PWN
42
37
  sock = TCPSocket.open(target, port)
43
38
  tls_context = OpenSSL::SSL::SSLContext.new
44
39
  tls_context.set_params(verify_mode: OpenSSL::SSL::VERIFY_NONE)
45
- # tls_context.verify_hostname = false
46
- # tls_context.ssl_version = tls_version
47
40
  tls_context.min_version = tls_min_version
48
- # tls_context.ciphers = tls_context.ciphers.select { |c| c[1] == cipher_tls }
41
+ # tls_context.ciphers = tls_context.ciphers.select do |cipher|
42
+ # cipher[1] == cipher_tls
43
+ # end
49
44
  tls_sock = OpenSSL::SSL::SSLSocket.new(sock, tls_context)
50
45
  tls_sock.hostname = target
51
46
  sock_obj = tls_sock.connect
@@ -65,12 +60,10 @@ module PWN
65
60
  case tls_min_version
66
61
  when OpenSSL::SSL::TLS1_VERSION
67
62
  puts 'Attempting OpenSSL::SSL::TLS1_1_VERSION...'
68
- # tls_version = 'TLSv1_1'
69
63
  # cipher_tls = 'TLSv1.0'
70
64
  tls_min_version = OpenSSL::SSL::TLS1_1_VERSION
71
65
  when OpenSSL::SSL::TLS1_1_VERSION
72
66
  puts 'Attempting OpenSSL::SSL::TLS1_2_VERSION...'
73
- # tls_version = 'TLSv1_2'
74
67
  # cipher_tls = 'TLSv1.2'
75
68
  tls_min_version = OpenSSL::SSL::TLS1_2_VERSION
76
69
  when OpenSSL::SSL::TLS1_2_VERSION
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.905'
4
+ VERSION = '0.4.907'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.905
4
+ version: 0.4.907
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.