
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Covert makes your string securely obfuscated.
Add this line to your application's Gemfile:
gem 'covert'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install covert
Covert.configure do |config|
config.cipher_key = 'blah!'
config.cipher = 'AES-256-CBC' # default
config.hmac_key = 'blah!'
config.hmac_digest = 'SHA256' # default
end
Covert.obfuscate('mystring') #=> "7hSfzDwp2JXZcieFpGCndA=="
Covert.unobfuscate('7hSfzDwp2JXZcieFpGCndA==') #=> "mystring"
Covert.hmac('hmac') #=> "13ca4d5b9cdc1485834a05d926913d919d3c83de29c99314a7dbccafdc8be8ac"
Comparison with gem obfuscate
with Blowfish algo.
require 'obfuscate'
require 'covert'
require 'benchmark'
require 'securerandom'
Obfuscate.setup :salt => 'a very weak salt indead.'
Covert.configure do |config|
config.cipher_key = 'blah!'
end
puts Benchmark.bm { |bm|
ids = []
bm.report("obfuscate x1000:") {
1000.times { ids << Obfuscate.obfuscate( SecureRandom.uuid, {:mode => :block} ) }
}
bm.report("clarify x1000:") {
ids.each { |id| Obfuscate.clarify( id, {:mode => :block} ) }
}
ids = []
bm.report("myobfuscate x1000:") {
1000.times { ids << Covert.obfuscate(SecureRandom.uuid) }
}
bm.report("myclarify x1000:") {
ids.each { |id| Covert.unobfuscate(id) }
}
}
user system total real
Obfuscate.obfuscate x1000: 7.883860 0.044474 7.928334 ( 7.944916)
Obfuscate.clarify x1000: 7.841752 0.016152 7.857904 ( 7.873886)
Covert.obfuscate x1000: 0.011217 0.012656 0.023873 ( 0.024485)
Covert.unobfuscate x1000: 0.003891 0.000358 0.004249 ( 0.004359)
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
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 tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/merqloveu/covert. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Covert project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that covert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.