psrp 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/test_psrp.rb ADDED
@@ -0,0 +1,32 @@
1
+ require 'psrp'
2
+
3
+ endpoint = 'http://192.168.142.231:5985/wsman'
4
+ psrp = PSRP::PSRPService.new(endpoint, :user => 'samo-range', :pass => 'somethinglonger12345!', :log_level => :info)
5
+
6
+ puts psrp.run_ps('echo "<xml><body>THIS IS NOT THE XML YOU ARE LOOKING FOR</body></xml>" > C:\hello; cat C:\hello')
7
+ puts psrp.run_ps('systeminfo')
8
+ puts psrp.run_ps('cat C:\hello')
9
+ puts psrp.run_ps('ipconfig')
10
+
11
+ puts psrp.run_ps('echo "' + "A" * (32725 + 1) * 30 + '" > C:\hello_A')
12
+
13
+ puts psrp.run_ps('notepad')
14
+
15
+ # dll = IO.binread('DemoDLL_RemoteProcess.dll')
16
+
17
+ # ps_script = "$ProcName = notepad
18
+ # $ComputerName = 192.168.142.231
19
+ # $PEBytes = @("
20
+
21
+ # for i in 0..(dll.length - 1)
22
+ # ps_script += dll[i].ord.to_s
23
+ # if i != dll.length - 1
24
+ # ps_script += ','
25
+ # end
26
+ # end
27
+ # ps_script += ")\n"
28
+ # ps_script += File.read('Invoke-ReflectivePEInjection.ps1')
29
+
30
+ # IO.binwrite('script.ps1', ps_script)
31
+
32
+ puts psrp.run_ps(File.read('script.ps1'))
metadata ADDED
@@ -0,0 +1,181 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: psrp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Sam Oluwalana
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httpclient
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.2.0.2
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.2.0.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: rubyntlm
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.6.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.6.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: logging
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.6.1
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '3.0'
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 1.6.1
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '3.0'
67
+ - !ruby/object:Gem::Dependency
68
+ name: nori
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '2.0'
74
+ type: :runtime
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '2.0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: gyoku
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '1.0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: '1.0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: builder
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: 2.1.2
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 2.1.2
109
+ - !ruby/object:Gem::Dependency
110
+ name: erubis
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '2.7'
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.7'
123
+ description: " Ruby library for sending huge Powershell packets over Windows Remote
124
+ Management\n"
125
+ email:
126
+ - soluwalana@gmail.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files:
130
+ - README.md
131
+ - LICENSE
132
+ files:
133
+ - ".gitignore"
134
+ - DemoDLL_RemoteProcess.dll
135
+ - Invoke-ReflectivePEInjection.ps1
136
+ - LICENSE
137
+ - README.md
138
+ - lib/psrp.rb
139
+ - lib/response_handler.rb
140
+ - lib/transport.rb
141
+ - lib/version.rb
142
+ - lib/wsmv/command_output_processor.rb
143
+ - lib/wsmv/commands/base.rb
144
+ - lib/wsmv/commands/close_shell.rb
145
+ - lib/wsmv/commands/create_pipeline.rb
146
+ - lib/wsmv/commands/init_runspace_pool.rb
147
+ - lib/wsmv/commands/receive.rb
148
+ - lib/wsmv/commands/send_data.rb
149
+ - lib/wsmv/psrp_message.rb
150
+ - lib/wsmv/templates/create_pipeline.xml.erb
151
+ - lib/wsmv/templates/init_runspacepool.xml.erb
152
+ - lib/wsmv/templates/runspace_availability.xml.erb
153
+ - lib/wsmv/templates/session_capability.xml.erb
154
+ - psrp.gemspec
155
+ - script.ps1
156
+ - test_psrp.rb
157
+ homepage: http://github.com/soluwalana/PSRP-RB
158
+ licenses:
159
+ - Apache-2.0
160
+ metadata: {}
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: 1.9.0
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubyforge_project:
177
+ rubygems_version: 2.5.1
178
+ signing_key:
179
+ specification_version: 4
180
+ summary: Ruby library for PSRP
181
+ test_files: []