Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
DWARF parser (only the .debug_info
section for now) using parslet and unix utilities.
Source code is avaiable under MIT license at https://github.com/jethrodaniel/dwarves.
Parses DWARF format, as outputed by the following:
readelf --debug-dump=info
objdump --dwarf=info
λ ./bin/setup
...
λ readelf --debug-dump=info spec/fixtures/c/build/example.so > spec/fixtures/out.dwarves
λ dwarves -T < spec/fixtures/out.dwarves | head
{
:compilation_unit_offset => "0x0"@66,
:length => "0x112"@89,
:architecture => "32-bit"@96,
:version => "4"@122,
:abbrev_offset => "0x0"@142,
:pointer_size => "8"@164,
:dies => [
{
:depth => "0"@168,
...
λ dwarves < spec/fixtures/out.dwarves | head
Contents of the .debug_info section:
Compilation Unit @ offset 0x0:
Length: 0x112 (32-bit)
Version: 4
Abbrev Offset: 0x0
Pointer Size: 8
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_producer : (indirect string, offset: 0x91): GNU C11 7.4.0 -mtune=generic -march=x86-64 -g -fPIC -fstack-protector-strong
<10> DW_AT_language : 12 (ANSI C99)
...
.debug_info
sectiongem install dwarves
λ ls bin/
console objdump readelf setup
λ rake -T
rake build # Build dwarves-0.1.0.gem into the pkg directory
rake clean # Remove any temporary products
rake clobber # Remove any generated files
rake doc # Generates documentation
rake install # Build and install dwarves-0.1.0.gem into system gems
rake install:local # Build and install dwarves-0.1.0.gem into system gems without network access
rake lint # Runs the linter
rake release[remote] # Create tag v0.1.0 and build and push dwarves-0.1.0.gem to 'https://rubygems.org'
rake test # Run tests
A good test for the parser is to parse its own input, since we reconstruct the output when printing.
./bin/readelf | bundle exec ./exe/dwarves | bundle exec ./exe/dwarves
Bug reports and pull requests are welcome on GitHub at https://github.com/jethrodaniel/dwarves.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that dwarves 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.