Bitcoin mining: a human introduction to the theory

Filed under Generic

For anybody not familiar with bitcoin, it is basically a peer to peer system to handle transactions of virtual money.

Here is a bit of a summary of how it works:
block – A block contains a set of transactions. But not only. It contains a mathematical puzzle to be solved and a reference to the previous block and more (see link to the bitcoin wiki)
block chain – A series of blocks together will compose the big “bitcoin db”, and a set of blocks is called a block chain. Every transaction can therefore be tracked to its source on bitcoin (well, at least to its crypto alias)
mining – And this brings us to our topic. Adding transactions to the block of chains will be done by miners. Given all the stuff included in a block, this is not an easy task… But will cover this in a bit.
Mining is rewarded through bitcoins.

An element, difficulty, is changed on a block level every 2016 blocks. Difficulty is created for the sole purpose of making a miner’s life hard. If the network was flooded with miners, blocks would be added to the chain one after the other and maintaining (costwise) the network would become increasingly difficult. Basically, the more processing power there is, the lower the shared income of miners.

Now, two weeks are used as a metric for the difficulty. If the 2016 blocks are found before the two weeks, it means there is a lot of processing power, and therefore difficulty can increase.
On the other hand, if the 2016 blocks were found after the two weeks, difficulty decreases.

Comes automatic that the number of miners since the bitcoin came to exist increased, and with it the difficulty… But more about my experiences there on the next post.

Anag vision LCD + Arduino

Filed under Arduino

Has been a while since I made a proper post, so thought it was about time to get something done!
I have recently been playing with Arduino – got a nice arduino DUE, a gyro system (they both deserve one post probably…) and an LCD display.

The LCD display was a standard LCD, 16 characters, 1 row, model ANAG VISION AV1611YFBY-WJ, on top “1601L Rev.B”:


Once sorted out all connections…

I uploaded the code on my nice Arduino DUE using the example code

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(16, 1);
lcd.print(“Hello World!”);

void loop() {


This is where I got the disappointment…


It was impossible to actually print the whole string… String was getting cut after 8 chars.
Since the display is 16 digits, cutting the string at the 8th character does not strike me immediately as an issue of the library…
How about, the LCD has actually two rows of 8 chars (although we can see only one)?
Strangely enough, changing the lcd.begin() to 8 columns, 2 rows did not make a difference.


Indeed, the solution was to use two rows – but the only way to do the trick was to move the cursor to the second row! Fortunately Arduino’s string manipulation really came in helpful! If anybody needs the code, here it is:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD’s number of columns and rows:


void printOnDisp(String toWrite) {
lcd.begin(8, 2);
lcd.setCursor(0, 1);

void loop() {

Updated source and binaries

Filed under Forensics, Security

New code and binaries out there!
It is now possible to set thresholds within the tool and there have been some stability improvements (though, still not exactly stable…)

I’ll publish the training videos on how to train new files in the next few days and start advertising the tool a bit more!

More news on the way!

Filed under Uncategorized
Tagged as ,

Although this website is not picking up yet, the page of ANNFiD (the only site where it is advertised officially so far) is getting from 50 to 100 viewers a day!
I am currently working on a new release of ANNFiD, I know right now setting the thresholds is quite hard (must modify sqlite directly), but the new release will get rid of the issue.

Shortly after the new release is out I’ll release the tutorial on how to train new files – so stay tuned for more news!

Last but not least, thank you for everyone helping me (for me this includes advertising the site or writing comments) – having some support is great when you are starting something new

Youtube video uploaded!

Filed under Forensics, Security
Tagged as

added a youtube video on how to detect files – available in the “Projects” Section.


Filed under Generic has just booted up.

I’ll try to update it with posts on various topics, including security and, most importantly, some of my projects.

The first project I’d like to make public is ANNFiD.

ANNFiD is a tool to detect file types from mangled up files (such as the ones you get from file carving), it uses neural network to detect the type from the byte pattern. This makes the tool extremely flexible – it was created with a nice GUI so training the tool to detect additional files is quite easy, even without any coding knowledge.

There is still much to do such as publishing some instructions and adding new projects and definitely improve the page CSS… But I believe it is time to make some of my ideas available so that they can be improved.

I guess I will write back some time soon!