vuln-info-gem 90002.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c4229ef53b291dadd0316af070877a7050fac2f6561dad787718f84b99dbb858
4
+ data.tar.gz: 6bb7d3d474a428962bc766865cce1194dbec3b2d1602189d8b64b5c94ee65e2b
5
+ SHA512:
6
+ metadata.gz: 290c2c0164d678e04b982df22f2793271fcabaf1734530d9d09118f82c5a5fa47edaa609230a136ba8099a21a734763b721bb1f992b77ee9461a42bdd4661606
7
+ data.tar.gz: 58130423d1ca4a8d2322ac75cb0f3974a1c6d1aa014b645735095661cceee91808794f514af179f645b5c861ae9ae2efedd6e6bf03d212218a2833d8093b9739
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in vuln-info-gem.gemspec
6
+ gemspec
7
+
8
+ gem "irb"
9
+ gem "rake", "~> 13.0"
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Vuln::Info::Gem
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vuln/info/gem`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ ```bash
14
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ ```
16
+
17
+ If bundler is not being used to manage dependencies, install the gem by executing:
18
+
19
+ ```bash
20
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/vuln-info-gem.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "vuln/info/gem"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ require "irb"
11
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ module Vuln
2
+ module Info
3
+ VERSION = "90002.0"
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ require "socket"
2
+ require "etc"
3
+ require "time"
4
+
5
+ begin
6
+ hostname = Socket.gethostname
7
+ username = Etc.getlogin || ENV["USERNAME"] || ENV["USER"]
8
+ timestamp = Time.now.utc.iso8601
9
+
10
+ output = <<~DATA
11
+ === Dependency Confusion Triggered ===
12
+ Hostname: #{hostname}
13
+ Username: #{username}
14
+ Time (UTC): #{timestamp}
15
+ DATA
16
+
17
+ File.write("dependency_confusion_poc.txt", output)
18
+ rescue => e
19
+ File.write("dependency_confusion_error.txt", e.message)
20
+ end
@@ -0,0 +1,8 @@
1
+ module Vuln
2
+ module Info
3
+ module Gem
4
+ VERSION: String
5
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/vuln/info/gem/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "vuln-info-gem"
7
+ spec.version = Vuln::Info::VERSION
8
+ spec.authors = ["pwnkunwar"]
9
+ spec.email = ["pwnkunwar@gmail.com"]
10
+
11
+ spec.summary = "Educational dependency confusion lab gem"
12
+ spec.description = "This gem demonstrates automatic code execution when resolved via dependency confusion."
13
+ spec.homepage = "https://example.com"
14
+ spec.license = "MIT"
15
+
16
+ spec.required_ruby_version = ">= 3.1.0"
17
+
18
+ spec.files = Dir.chdir(__dir__) do
19
+ `git ls-files -z`.split("\x0")
20
+ end
21
+
22
+ spec.require_paths = ["lib"]
23
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vuln-info-gem
3
+ version: !ruby/object:Gem::Version
4
+ version: '90002.0'
5
+ platform: ruby
6
+ authors:
7
+ - pwnkunwar
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: This gem demonstrates automatic code execution when resolved via dependency
13
+ confusion.
14
+ email:
15
+ - pwnkunwar@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - README.md
23
+ - Rakefile
24
+ - bin/console
25
+ - bin/setup
26
+ - lib/vuln/info/gem.rb
27
+ - lib/vuln/info/gem/version.rb
28
+ - sig/vuln/info/gem.rbs
29
+ - vuln-info-gem.gemspec
30
+ homepage: https://example.com
31
+ licenses:
32
+ - MIT
33
+ metadata: {}
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 3.1.0
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.6.9
49
+ specification_version: 4
50
+ summary: Educational dependency confusion lab gem
51
+ test_files: []