Doorgaan naar hoofdcontent

In the beginning...

This blog is a collection of articles about analysis of binary and source code files, and anything related to scanning for license compliance, security or code provenance. I started this blog because I think that the software scanning industry (especially for binary files) is not in a good shape and I feel that it is time to change that, as we collectively deserve better.

One of the observations that I made in the last few years is that people and companies are flocking to expensive tools and solutions when there is no need to because better working (and cheaper) solutions exist. The reasons are bad understanding of the problem needing to be solved, plus effective marketing.

The companies then use the wrong tools to try to get things done and shoehorn these tools into their process, leading to suboptimal results, frustration, time wasted and money lost. The reason: someone paid a lot of money for the license for the tool, so they'd better make use for it!

What I have also seen is that for most of the problems that people are trying to solve there are perfectly fine commodity solutions available at zero or very little cost. Usually it just means taking a few steps back, understanding the problem, using common sense and then using the right tool for the right job.

In this blog I want to describe best practices of scanning (when, what and how), open source alternatives to commercial scanning tools, but also to deepdive into specifics of file formats, open source tools and analysis techniques.

Specifically I will be talking about the following:
  1. open source license compliance
  2. security
  3. software archaeology/provenance
You might find example code here and there as well. This code will mostly be in Python3, plus the odd bash script here and there. Let's start!

Reacties

Populaire posts van deze blog

Walkthrough: Intel HEX format

One format that you normally would not encounter very often unless working with certain microcontrollers is the Intel HEX format. This format is a text format to transfer binary information in a text representation. The Wikipedia article about the format is very informative and lists almost everything that needs to be known about the format (but not everyting, as I will show later). Most scanners would say that these files are text files, but they are actually binary files in disguise! This is why I try to recognize them and process them. Unless you are working a lot with microcontrollers then the most likely place where you will find these files is in the Linux kernel, where many firmware files (for chips) are included in Intel HEX format. Creating an unpacker for this file format is quite easy, but you could also use the the SRecord package , which also is able to extract/convert files in different, but similar file formats, such as SREC and others. For example to convert th...

Walkthrough: ZIP file format

A very popular format for compressing and archiving files is the ZIP format. Its history is well documented at the PKZIP page on Wikipedia . While on Unix systems (such as Linux) other compression tools (tar for archiving, combined with gzip for compression) have historically been more popular it is the dominant archiving and compression format in the rest of the world. Other systems, like Java and Android are also using ZIP extensively (in JAR and APK files respectively) and other formats, such as Open Document Format (ODF) are also based on ZIP. The specifications for ZIP have been open for years and can be freely (re)implemented and every decent programming language has good support for working with ZIP files, although not every implementation fully implements all functionality. For example, Python 3 has is a fairly complete implementation with support for LZMA and bzip2 compression and large files (ZIP64), but not for multi-file ZIP. The references in the rest of this blog post...

Walkthrough: WebP file format

A graphics file format that I am encountering a bit more often during my work is Google's WebP file format. Even though it is fairly recent (or the history it is best to read the Wikipedia page about WebP ) it builds on some quite old foundations. One reason for Google to come up with a new graphics file format was file size: Google indexes and stores and sends many graphics files. By reducing the size of files they could significantly save on bandwidth and storage space. Shaving off some bytes here and there really starts to add up when you are doing it by the billions. Everyting counts in large amounts - Depeche Mode WebP file format The WebP format uses the Resource Interchange File Format (RIFF) as its container. This format is also used by other formats such as WAV and very easy to process automatically. A WebP file consists of a header, and then a number of chunks. The data in the header applies to the entire file, while data in the chunks only apply to the individu...