Security flaw at PostModern allows hackers to send letters for free?

Security flaw at PostModern allows hackers to send letters for free?

PostModern has a procedure called Prelabel. In this procedure, you are sent a stack of several sheets of blank stamps and can use these as stamps. But is the procedure as secure as it could be?

A cool idea with plenty of advantages

The principle is brilliant: Instead of always paying for the correct stamps in advance and then weighing each letter individually and deciding which postage is required, PostModern has a very simple procedure here: Prelabel.

Barcode
Barcode with the customer number
in the Code-2of5 Interleaved format

An inconspicuous sticker with a number and a barcode is glued next to the address field. This allows the scanner at PostModern to read the Prelabel and assign it to the customer. The letter is then franked. Billing takes place monthly.

Unfortunately, I will not be publishing a photo of my Prelabels in this article. I am a Prelabel customer myself and would be scoring a major own goal: revealing my secret customer number.

Customer number as a secret: Security by Obscurity in its ultimate form

The crux of the matter: In this case, the authorization of a payment function occurs via a secret that is not one.

Because: The sticker remains stuck to the letter during shipping. This means: The recipient of the pre-labeled letter will also know the customer number and the barcode afterwards.

An attacker therefore only needs to obtain any customer number once and can subsequently print the labels themselves. They stick them on a letter and put it in the mailbox. The invoice is then received by the person whose customer number was stolen.

PostModern's pre-labels are also relatively plain and can therefore be easily forged. They do not feature any patterns, colors, or similar elements that are difficult to imitate.

What does PostModern say about this?

I subsequently contacted PostModern. Their justifications for why the process is secure, after several follow-up questions, were the following:

While it is fundamentally commendable to announce that liability will be assumed for one's own security architecture, would it not be better to build the system securely from the start? The path to that is not that difficult.

The self-test: Does the trick work now?

After we, as Launix, received our sheets and suspected security flaws, we started the self-test. We hired someone to forge pre-labels themselves using a set of instructions we wrote. The result was catastrophic:

Yet despite all these gross errors, PostModern sent the forged letters without any issues. There is definitely a need for improvement here.

Solutions from the misery

Of course, we are not facing an unsolvable problem here. The idea with the pre-labels can certainly be implemented, and I will show some ways to do this. Some work, some do not work as well.

Wrong solution 1: Switch to a secret barcode procedure

The barcode used in the pre-label is "Interleaved 2 of 5". It is tempting to simply say: "We switch to a secret code format that no one knows, then no one can copy it."

However, this idea does not work because one only needs to copy the image of the barcode. You do not have to understand it to be able to imitate it. Since the same barcode is glued onto every letter, its origin is no longer traceable.

Wrong solution 2: Give every letter a serial number

Now one could say: We simply attach a serial number to the letter number. Starting at 000000, the range up to 001999 will be printed.

This idea also does not work. The letters are never dropped off in the exact order in which they are labeled. Therefore, a certain range of serial numbers would always have to be allowed during settlement. An attacker can take advantage of this inaccuracy and simply count up a few numbers from their last received letter. First come, first served: In this case, the legitimate letter would be rejected and the forged letter would get through.

Wrong Solution 3: Monitor origin mailboxes, check sender address

While this control mechanism would put some hurdles in a fraudster's way, in principle, they only need to find a Prelabel customer who lives in the same town or district as them and does not write their sender address publicly on the letter. Postal secrecy protects them from further control mechanisms.

Wrong Solution 4: Introduction of additional physical security features

Manual monitoring of every letter for forgery patterns, glued edges, etc., is no longer appropriate today. UV and watermark markings can be checked automatically, but are just as easy to forge because the technology is available to everyone. One could have special color formulas mixed, similar to banknotes, which would then be uniquely for PostModern. However, I consider machine verification unrealistic, and the effort for manufacturing the Prelabel labels would also increase significantly.

Correct Solution 1: Remove Prelabel labels in the shipping center

If the customer number were to remain a secret, a completely confidential area would be required where it can be processed and sent freely.

The customer number is long enough with 16 decimal places to not be guessable. Of course, one does not know how many of the digits are encodings for countries, districts, etc. That would weaken the process. In case of failure, i.e., if a customer number becomes known to third parties, the customer number would simply have to be replaced and the shipping costs incurred through misuse would be refunded to the customer.

If the stickers with the customer number are then removed in the shipping center, you have a completely confidential chain: PostModern knows the customer number but keeps it confidential. The customer and their employees receive the customer number (it can be read on the letters) and treat it confidentially. They are brought to the mailbox by a trusted person. In the mailbox, they are well sealed and are brought to the shipping center by a trusted person. In the shipping center itself, the sticker is then removed by trusted employees to protect the secret.

By the way, covering the labels or painting over them with a marker is not possible. The reason for this should be clear to everyone.

Quite cumbersome, don't you think?

Correct Solution 2: Use access tokens instead of the customer number

This solution is quite simple to explain and only requires a manageable amount of additional infrastructure.

Instead of the repeating customer number, which can be copied and reused at any time, something tamper-proof must be used: a securely generated random number, known as a one-time token, which PostModern stores internally and marks as used once the letter labeled with it has been sent.

Each pre-label would thus have a different number, which is not related to the customer number nor to each other (difference from serial numbers!). Each of these tokens may only be used once.

A delivery of 50 sheets contains 3,200 pre-labels. If one were to store 3,200 64-bit random numbers consecutively on the hard drive, that would be a data volume of 26 kilobytes. Even if you add database management structures to achieve faster findability and easier deletion of entries, you reach a maximum of 100 KiB per customer. If you add the costs of permanence, you could suggest an expiration date of 10 years. With cloud storage costs of € 0.0184/GB/Month this solution would result in net infrastructure costs of 0.02 cents per customer for 10 years with a sales potential of € 1,440.

A random number size of 64 bits should be sufficient. This is a draw of 1 out of 18,446,744,073,709,551,616, where even if you have 1 billion valid tokens in circulation, the chance of being able to forge a letter is still 1:184,467,440,730 (as opposed to 1:0 with the old method)

Many companies still shy away from the infrastructure effort required to track individual letters via a database. They try to mimic a token procedure with serial numbers and attach a checksum to the serial number to create the desired security. However, most known checksum procedures are linear, which means they are insecure. The procedure could be figured out by a mathematician with a bit of puzzling. The additional trust in the system, since "security is provided by the check digit procedure," would only shield attackers who can then smuggle forged stamps into the system undisturbed. A cryptographically secure hashing procedure using a secret, on the other hand, would be secure. The MAC (Message Authentication Code) procedure works similarly. However, storage is necessary at the latest to detect duplicate submitted serial numbers.

Correct Solution 3: Leave everything as it is

As a security researcher, it naturally tickles your fingers to find all security flaws, report them, and see them being fixed. Ultimately, however, the decisions are made by business representatives.

In the early days of credit cards, credit cards were designed exactly like PostModern's Prelabel system: the credit card number was stored on a magnetic stripe and could be read. Fraud losses amounted to 1-2 million per year - peanuts compared to the additional costs that a chip card system instead of magnetic stripes would have cost.

One day, however - with the increasing spread of the so-called Internet - it suddenly became possible to go shopping anonymously with forged credit cards. The fraud numbers soared so high that the compensations the banks had to pay their customers became too large. By the time all credit cards were switched to the more secure system, multi-billion sums in damages had accumulated.

Misusing a rarely used instrument stands out. There are only a few customers and abusers can be easily narrowed down. As PostModern grows and the convenient Prelabel system remains, one should, however, keep a strategy in the drawer.

PostModern: A textbook example of IT security

I am writing about this topic because it is a textbook example of an insecure system that simply should have been designed differently. Normally, computer scientists are involved in the design of such systems, who would point out such vulnerabilities during the planning meeting. I assume that at the latest the developers at PostModern must have pointed out this problem, but their objections were ignored by their superiors because it might have been too late by then.

I can explain well to my apprentices that a mistake, the later it is found, the more expensiveto be corrected. In this case, hundreds and thousands of stacks of sheets would have to be recalled, a transition period for the validity of the pre-labels would have to be established and communicated, a new system would have to be developed, and new sheets would have to be sent to the customers. The customers could then redistribute their sheets among themselves. Costs that could have been avoided if one had backed down during the design phase (involve experts in the planning!) or in the implementation phase, rather than only after the market launch.

The correction of the error could be so expensive that it is preferable to live with the fact that 1,000-2,000 letters are sent illegally per year, which the customers either do not notice and pay for, or in extreme cases, complain about. In that case, one would only have to build in the possibility for a customer to change their customer number after too many fraudulent letters have been sent through them. The letters still circulating could then be collected and handed over to the police for investigation of fraud.

The fraud scheme remains shaky

Those who "steal" customer numbers and use them for the "free" mailing of letters have little to fear in the initial period, as long as they remain inconspicuous. Furthermore, the principle of postal secrecy applies, which also protects the content of his letter, from which his identity could potentially be derived - However, he could deny having franked the letter itself at any time. Or simply claim that there was an online service where one was allowed to buy stamps. Where exactly, one could then have forgotten.

In terms of criminal law, this is a case of fraud: Anyone who obtains a financial advantage for themselves or third parties by pretending false facts is committing fraud. The deception here lies in the fact that the fraudster produces shipping labels that PostModern thinks it issued to the customer itself.

The damage is currently borne mainly by the pre-label customer. If he does not count his letters exactly, he will not be able to prove the discrepancy to PostModern and will not notice the theft at all. Especially with large companies, small numbers can quickly get lost.

In principle, one thinks that not too much can be extracted from the system. Companies will not take the risk of sending their corporate mail using "stolen" stamps. Private individuals do not send as many letters, and a letter's postage is perhaps a few cents.

But what if someone carries out a fraud scheme similar to PC-Fritz? A commercial fraudster could pose as a reseller and offer the pre-labels very cheaply on the grounds of a "bulk discount." If he then also promotes the mass mailing of advertising mail - thousands of shipments - the letters will be sent first - no matter who has to pay for it later.

What about the other postal providers?

Image 1 - Deutsche Post Universal Registered Mail Label Roll with 500 pieces
Label role of the German Post

Different systems are in use on the market. Deutsche Post, for example, uses a type of serial number system. In the photo, you can see numbers such as RJ 19 013 504 6DE and RJ 19 013 501 5DE. There is a difference of 2 digits between 504 6 and 501 5DE. Assuming these are serial numbers (501, 502, 503, 504) each with a check digit, it depends on how secure the checksum calculation is, i.e., whether it is a cryptographically secure checksum involving a secret (a password known only to the Post) or a simple checksum like those on D-Mark notes, which have already been cracked. Correctly guessing a single digit has a 10% probability - unsuitable if one intends to send letters that actually arrive. If the number can be calculated, one could then count up the serial numbers of a postal customer accordingly.

If, on the other hand, the numbers are serial numbers with gaps (15, 46), the effect is the same: An attacker would have to guess a serial number that could be present on the roll with a 2%-10% probability. What would be important for the security of the procedure is that the gaps are not "calculable." Otherwise, an attacker would obtain a roll of these numbers and crack the algorithm. In this case, one would need also a token storage. I doubt that the Post uses such a thing.

There are also many other postal providers such as NordPost, CitiPost OWL, LMF-Postservice, BW-Post, and many more. Since I do not live in their catchment area, it was not possible for me to examine their systems as well. I would appreciate feedback on which pre-label procedures other providers use.

Conclusion

Fixing the error would cost approximately 30,000 to 100,000 euros. The existing detection software would have to be converted to the token system, and all pre-label customers would have to be informed that after a transition period of X weeks, the old pre-label labels should no longer be used and new sheets must be sent.

However, it is possible that PostModern will continue to operate the old system as long as the security vulnerability is not actively or not exploited in sufficient quantities.

Categorias