Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ruby]

The tag has no usage guidance.

-2
votes
0answers
41 views

which script language? [closed]

I am very new in this platform and also in cybersec. Can you please tell me which script language is better to learn for understanding and manipulating the metasploit modules? Python, Ruby? Maybe Java ...
2
votes
0answers
125 views

How does the Ruby on Rails CSRF Protection Work?

I am not sure i completely understand how Ruby on Rails handles CSRF protection. My understanding was that a token is generated and embedded in the HTML markup as a meta tag, and at the same time ...
1
vote
0answers
41 views

Odd rails filter allows <script> tag but not <% %>

I am on a pentest for a client and they have a custom rails app that allows admin accounts to change page contents. While the front end editor filters script tags the backend does not, so using Burp I ...
1
vote
1answer
48 views

sample .apk file fore testing the Directory traversal vulnerability [closed]

I am looking to get a .apk file for testing the Directory traversal vulnerability. https://github.com/rubyzip/rubyzip/issues/315 We have upgraded the rubyzip gem to address this issue. And I want ...
1
vote
1answer
34 views

How to verify Ruby on Rails projects are at current patch levels?

I've got a few Ruby on Rails systems running Ubuntu 14.04LTS. The Ubuntu version of supported Ruby is 1.9.1 but the developers use a Gemfile and Bundler which (AFAIK) installs Ruby (and gems) out-of-...
5
votes
0answers
235 views

Ruby Devise salt exposed

The remember_user_token cookie token generated by the Ruby Devise authentication component reveals part of a bcrypt salted credential when decoded. For example: remember_user_token=...
1
vote
1answer
93 views

How to transfer the `id` more securely in Rails project?

I checked my rails project with a brakeman, and received warning. Potentially dangerous key allowed for mass assignment: params.require(:inspector_id) class ReportsController < ...
6
votes
2answers
306 views

How does the Meterpreter load modules?

I've been using the Meterpreter for some time and I'm still quite new to it and one of the questions I have is how it's module loading works. Correct me if I'm wrong as I'm still learning how to use ...
0
votes
2answers
769 views

Zap Proxy - script to modify headers automatically

Hello just wondering if someone already wrote a script for Zap to modify headers automatically with out me having to do it on each response/request.. example. modify response from 3xx or 4xx to 2xx to ...
2
votes
8answers
2k views

How should I securely generate random passwords when importing new users?

I need to generate random passwords when importing new users from an external source. I'm currently doing it by taking a random assortment of 8 lowercase/uppercase letters, and numbers. I am also ...
2
votes
0answers
262 views

Arp Spoofing detection with Ruby [closed]

I am planning to develop a Ruby script that detects ARP spoofing attacks on a local network, I have a few questions about it. There are three scenarios I am taking into consideration: First idea as ...
2
votes
0answers
84 views

What is the purpose of OpenSSL::X509::ExtensionFactory [closed]

Why standard library of ruby suggests to create factory and only then add extensions to certificate ? ef = OpenSSL::X509::ExtensionFactory.new ef.subject_certificate = our_cert ef.issuer_certificate =...
3
votes
3answers
399 views

Plain text Rails environment variables and security

I work for a healthcare company that emphasizes security, due to the sensitivity of the data that we work with. Recently, we've been doing a lot of auditing (internal and external) of our current "...
3
votes
1answer
800 views

Restriction to ui panel on BeEF+Bettercap generates error login

I'm not sure if I discovered a possible bug. I already reported to Bettercap's staff on their Bettercap's Github but as you can see on that link, it seems the problem is not on Bettercap's side. Maybe ...
1
vote
1answer
2k views

“SSL: CERTIFICATE_VERIFY_FAILED” with my own certificates

Two sites. Only one works. I have two SSL-enabled sites running on Heroku, both of which provide APIs. I bought the SSL certificates from different sources. When I use Ruby and Python to make some ...
-1
votes
0answers
37 views

How to structure this specific setup

A user goes to a website and types information into input fields <input class="form-control" type="text" id="age" name="age" value="<?php echo htmlspecialchars($_POST['age']); ?>"> and ...
-3
votes
1answer
95 views

How to determine the number of bytes from a string with mix of “\x” and normal characters? [closed]

I was looking at this exercise and it was mentioned that the string \x1AL\xD23k\xCA\x1D\xD7 consists of 8 bytes. However, I fail to see how there are 8 bytes in the string. Shouldn't there be 7 bytes ...
0
votes
2answers
153 views

Analysing a MetaSploit Exploit, can't figure out why a function is not executing

I'm studying a MetaSploit Exploit vnc_keyboard_exec, and I was wondering where is defined the function cmd_psh_payload (line 141). So I greped through msf/core directory on my Kali machine and found ...
2
votes
1answer
65 views

Is Ruby's SQL Injection protection enough to warrant not using additional security measures?

In my experience, SQL Injection is always a threat. If bad actors don't penetrate via SQL, they get enough data to launch bruteforces via MBASentry or do privilege escalation via scripts. However, I ...
0
votes
1answer
166 views

Metasploit Ruby Scripting: Problem with framework.db.creds

I am trying to access the credentials I have gathered so far with Metasploit in a Ruby-Resource script. Unfortunately I get the following error when I try to access framework.db.creds. >> ...
3
votes
1answer
127 views

Possibility of SQLI in the following request?

I was testing an web application which is written in Ruby, Rails framework, when I stumbled on the following request which was sent. I modified the request and now it displays me a part of the query ...
0
votes
1answer
1k views

SQL injection in find_by Active Record RoR 4

I was trying to understand the possibility of SQLi in a Rails Application, that I am currently auditing for a client, that uses Active Record 4.2.0. Now, I have limited experience with RoR so please ...
2
votes
0answers
355 views

Token based authentication: Why invalidate the token after each request?

I use the gem devise_token_auth while developing an API for a mobile app. Authors claim that: Tokens should be invalidated after each request to the API. This behavior is enabled by default. Can ...
1
vote
0answers
97 views

Metasploit Plugin not interacting with Meterpreter Client

I'm developing a plugin to automate some post exploitation tasks. Two days ago all methods that interact with the client (from the client_core and stdapi) simply don't return anything, like if in a ...
1
vote
0answers
1k views

Converting Metasploit module to standalone Python script [closed]

How easy is to convert Ruby code to Python code and to change Metasploit module into standalone Python script for Linux?
2
votes
1answer
851 views

AES encryption between Java and Ruby: what is the default mode and padding for AES in Java?

I'm writing a ruby app that needs to create some encryption that our java app needs to be able to decrypt. For this I have done some research, and I have this Java code now: Cipher cipher = Cipher....
0
votes
2answers
215 views

Is injecting a second Authenticity_Token on a login request considered a security threat?

I'm running a security test on a website. The login request looks like this: POST /sessions HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/...
6
votes
1answer
425 views

Password security when connecting to ldap with rails application

How do you store a username/password securely in a rails app when using it for many ldap searches? The connection in the app requires ldap_bind_authenticate(Net::LDAP.new, username, password) each ...
2
votes
1answer
323 views

Can we join a table in this Ruby on Rails Direct Object Reference?

I am trying to inject a RoR application... I have found a nice command which will allow me to delete things unchecked...but the problem is that its not a problem its a very minor point, to make it a ...
5
votes
3answers
4k views

ruby on rails pentesting web applications

I am currently testing a RoR web application, but I am honestly at a bit of a loss, I have never gone up against a RoR application before and I was wondering if there were any specific tools I could ...
1
vote
1answer
108 views

Implement GPG Verification (Bitcoin-OTC)

I'm looking to implement a "Verify with Bitcoin-OTC" feature for my web app. The general idea is the user would prove he owns a particular account on the external site Bitcoin-OTC and my app would ...
6
votes
2answers
4k views

Ruby resources for Penetration testing/testers and ethical hackers [closed]

I'm wondering if there is a place where I can find up-to-date information regarding ethical hacking with Ruby. I do find lot of Python information, which is OK, but I have 4 years of experience coding ...
1
vote
1answer
5k views

Checking if current user exists before executing code

In one of my controllers I have this method: def method_name if current_user @model = Model.find(params[:id]) if @model.destroy flash.alert = 'Model deleted successfully' ...
0
votes
1answer
400 views

I get the feeling that Microsoft and Mac use two different forms of AES

I have an AES string being produced with this class, the AesCryptoServiceProvider Class provided by Microsoft. And I need to decode this encryption with Ruby's SSL::Cipher class . The problem is ...
9
votes
2answers
20k views

Why would you need a salt for AES-CBS when IV is already randomly generated and stored with the encrypted data?

I was looking at this code and came across these comments which says encrypting without a salt is insecure. Why would it be insecure when you are already using a random IV for each value? I think the ...
2
votes
1answer
75 views

How does CVE-2013-4287 make Rubygems any more vulnerable?

I've recently heard about CVE-2013-4287, which can cause denial of service due to CPU consumption. But earlier this year, I attended Hacking with Gems which showed all kinds of weird and wonderful ...
4
votes
1answer
260 views

Does Apple maintain the security of the built-in Ruby?

Does Apple maintain the security of the Ruby implementation that comes by default in OS X? I recently heard about CVE-2013-4073, but when I ran "Software Update..." on my OS X Lion box, it didn't ...
10
votes
3answers
809 views

What simple security considerations can I / should I make for a read-only API?

Right now I'm setting up an API, to be consumed on the client-side to set up a directory site. I'm wondering what extra steps I need to take just to prevent people from gaining write access to the ...
6
votes
2answers
964 views

What risks are involved with installing gems from rubygems.org? Are alternatives safer?

Normally, when installing a Ruby gem, I'd ask my system admin to do sudo gem install gemname However, there was recently a security breach with the source of gems, http://rubygems.org , and I'm ...
11
votes
2answers
2k views

What unique risks does MVC model binding bring to a website? What additional vigilance is needed?

From what I understand, "model binding" is where a website based on ASP.NET MVC or Ruby on Rails (there are others...) takes parameters in HTTP's GET statement and passes them as variables to code ...
1
vote
2answers
19k views

Why does OpenSSL not include AES-256-GCM? [closed]

I'm trying to implement AES-256-GCM in Ruby. Ruby's OpenSSL wrapper library and aead library both clearly seem to believe that OpenSSL itself supports this. However, neither 0.9.8r (which I had ...
0
votes
1answer
183 views

How do I prevent my Rails application from attack? [closed]

My website is being nuked by new signups and new posts some of which don't even have user.id associated with. How do I solve this? What code should I add to the user#new page and/or post#new page. ...
4
votes
2answers
698 views

Can anybody recommend any gems for checking security vulnerabilities? [closed]

I want to check one of my RoR projects for security vulnerabilities. So can anybody recommend any gems for my needs?
5
votes
2answers
1k views

Could the bcrypt-ruby binding be vulnerable?

While developing a Ruby on Rails application using a commonly used authentication library named devise, I noticed from the prefix $2a$ of the produced password hashes in the application database that ...