DE102017214584A1 - Method and device for protecting a device - Google Patents

Method and device for protecting a device Download PDF

Info

Publication number
DE102017214584A1
DE102017214584A1 DE102017214584.6A DE102017214584A DE102017214584A1 DE 102017214584 A1 DE102017214584 A1 DE 102017214584A1 DE 102017214584 A DE102017214584 A DE 102017214584A DE 102017214584 A1 DE102017214584 A1 DE 102017214584A1
Authority
DE
Germany
Prior art keywords
file
fuse
attribute value
interface module
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
DE102017214584.6A
Other languages
German (de)
Inventor
Heiko Baur
Paulius Duplys
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Robert Bosch GmbH
Original Assignee
Robert Bosch GmbH
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Robert Bosch GmbH filed Critical Robert Bosch GmbH
Priority to DE102017214584.6A priority Critical patent/DE102017214584A1/en
Priority to PCT/EP2018/071052 priority patent/WO2019038052A1/en
Priority to CN201880054442.0A priority patent/CN110945507A/en
Publication of DE102017214584A1 publication Critical patent/DE102017214584A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/101Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM] by binding digital rights to specific entities
    • G06F21/1011Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM] by binding digital rights to specific entities to devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

Verfahren (10) zum Schützen eines Gerätes (d), gekennzeichnet durch folgende Merkmale:
- ein Dateisystem des Gerätes (d) wird individualisiert (20) und
- eine von dem Gerät (d) zu verarbeitende Datei (f) wird an die individualisierte Laufzeitumgebung angepasst (30).

Figure DE102017214584A1_0000
Method (10) for protecting a device (d), characterized by the following features:
- A file system of the device (d) is individualized (20) and
a file (f) to be processed by the device (d) is adapted to the individualized runtime environment (30).
Figure DE102017214584A1_0000

Description

Die vorliegende Erfindung betrifft ein Verfahren zum Schützen eines Gerätes. Die vorliegende Erfindung betrifft darüber hinaus eine entsprechende Vorrichtung, ein entsprechendes Computerprogramm sowie ein entsprechendes Speichermedium.The present invention relates to a method for protecting a device. The present invention also relates to a corresponding device, a corresponding computer program and a corresponding storage medium.

Stand der TechnikState of the art

Als Sicherheitslücke wird auf dem Gebiet der Informationssicherheit jedweder Fehler in einer Software bezeichnet, durch welchen ein Programm mit Schadwirkung (malware) oder ein Angreifer in ein Computersystem eindringen kann.A security breach in the field of information security refers to any errors in a software through which a program malware or an attacker can invade a computer system.

Sicherheitslücken stellen eine Bedrohung für die Sicherheit eines Computersystems dar. Es besteht das Risiko, dass die betreffende Sicherheitslücke ausgenutzt und das betroffene Computersystem kompromittiert werden kann. Sicherheitslücken entstehen unter anderem durch den unzureichenden Schutz eines Computers vor Angriffen aus dem Netz (beispielsweise mangels Firewall oder anderer Sicherheitssoftware) sowie durch Programmierfehler im Betriebssystem, Webbrowser oder anderen Softwareanwendungen, die auf dem System betrieben werden.Vulnerabilities pose a threat to the security of a computer system. There is a risk that the vulnerability in question may be exploited and the affected computer system compromised. Vulnerabilities are caused, among other things, by inadequate protection of a computer from attacks from the network (for example, lack of firewall or other security software) and programming errors in the operating system, web browser, or other software applications running on the system.

DE102015225651A1 offenbart ein Verfahren zum Schützen eines Gerätes. Hierbei erzeugt ein Prüfer eine erste Zufallszahl und eine zweite Zufallszahl, errechnet anhand der zweiten Zufallszahl mittels einer emulierten oder zuvor ausgemessenen Hardwarefunktion des Gerätes einen kryptografischen Schlüssel, verschlüsselt die Software mit dem Schlüssel in ein Kryptogramm, sendet das Kryptogramm und die erste Zufallszahl an das Gerät, empfängt eine Prüfsumme von dem Gerät, errechnet anhand der ersten Zufallszahl und eines nachgebildeten Arbeitsspeichers des Gerätes mittels der emulierten oder zuvor ausgemessenen Hardwarefunktion und einer vorgegebenen kryptografischen Hashfunktion einen Bezugswert, unterzieht die Prüfsumme einer Prüfung anhand des Bezugswertes und sendet, falls die Prüfung gelingt, die zweite Zufallszahl an das Gerät. DE102015225651A1 discloses a method of protecting a device. In this case, an examiner generates a first random number and a second random number, calculates a cryptographic key based on the second random number by means of an emulated or previously measured hardware function of the device, encrypts the software with the key into a cryptogram, sends the cryptogram and the first random number to the device , a checksum from the device, calculated on the basis of the first random number and a replicated memory of the device by means of the emulated or previously measured hardware function and a given cryptographic hash function, receives a reference, subjecting the checksum to a check based on the reference value, and if the test succeeds, the second random number to the device.

Offenbarung der ErfindungDisclosure of the invention

Die Erfindung stellt ein Verfahren zum Schützen eines Gerätes, eine entsprechende Vorrichtung, ein entsprechendes Computerprogramm sowie ein entsprechendes maschinenlesbares Speichermedium gemäß den unabhängigen Ansprüchen bereit.The invention provides a method for protecting a device, a corresponding device, a corresponding computer program and a corresponding machine-readable storage medium according to the independent claims.

Der erfindungsgemäße Ansatz fußt hierbei auf der Erkenntnis, dass bekannte Sicherheitslücken oder Schwachstellen typischerweise deswegen zu einem massiven Angriff genutzt werden können, da alle Instanzen der fehlerhaften Software die gleiche Sicherheitslücke aufweisen. Dies wiederum ermöglicht es einem Angreifer, eine einzelne Datei oder anderweitige Eingabe zu erstellen, die dann verwendet werden kann, um irgendeines der anfälligen Geräte (oder alle auf einmal) anzugreifen.The approach according to the invention is based on the recognition that known vulnerabilities or vulnerabilities can typically be used to a massive attack, since all instances of the faulty software have the same vulnerability. This in turn allows an attacker to create a single file or other input that can then be used to attack any of the vulnerable devices (or all at once).

Der nachfolgend vorgestellten Lösung liegt daher der Gedanke zugrunde, ein neuartiges Verfahren zum Härten von miteinander verbundenen Vorrichtungen gegen diese Art von massiven Angriffen zu schaffen, das die für einen Angriff erforderlichen Anstrengungen deutlich erhöht.The solution presented below is therefore based on the idea of creating a novel method for hardening interconnected devices against this type of massive attacks, which significantly increases the effort required for an attack.

Zwei Vorzüge dieser Lösung liegen in der erhöhten Widerstandsfähigkeit erfindungsgemäß gehärteter Systeme gegen softwarebasierte Angriffe, d. h. Angriffe, die Software-Schwachstellen ausnutzen, sowie ihrem minimalen Zusatzaufwand in Bezug auf Rechenleistung, Kodeumfang und Kode-Komplexität.Two advantages of this solution lie in the increased resistance of hardened systems according to the invention to software-based attacks, ie. H. Attacks that exploit software vulnerabilities and their minimal overhead in terms of processing power, code size, and code complexity.

Durch die in den abhängigen Ansprüchen aufgeführten Maßnahmen sind vorteilhafte Weiterbildungen und Verbesserungen des im unabhängigen Anspruch angegebenen Grundgedankens möglich. So kann vorgesehen sein, dem zu schützenden Gerät zufällig den Wert eines Dateiattributes zuzuordnen, anhand derer Gerät und vorgesehene Datei individualisiert werden.The measures listed in the dependent claims advantageous refinements and improvements of the independent claim basic idea are possible. Thus it can be provided to associate the device to be protected with the value of a file attribute by means of which the device and intended file are individualized.

Angenommen, ein Hacker rekonstruiert ein auf diese Weise geschütztes Gerät bestimmten Typs, z. B. einen Haus- oder Heizungs-Controller oder eine IP-basierte Kamera. Selbst wenn er eine ausnutzbare Software-Schwachstelle findet, hindert der einzigartige, zufällig generierte Wert des Attributes ihn daran, die entdeckte Sicherheitslücke auf anderen Geräten desselben Typs auszunutzen.For example, suppose a hacker reconstructs a device of this type that is protected in this way. For example, a home or heating controller or an IP-based camera. Even if it finds a exploitable software vulnerability, the unique, randomly generated value of the attribute prevents it from exploiting the discovered vulnerability on other devices of the same type.

Gemäß einem weiteren Aspekt kann vorgesehen sein, den zufällig erzeugten Attributwert in einer Datenbank dem jeweiligen Gerät zuzuordnen. Infolgedessen steigt der Aufwand des Hackers für einen erfolgreichen Angriff im Wesentlichen linear mit der Anzahl der Geräte, die er angreifen möchte. Dies folgt aus dem Umstand, dass der Hacker - sofern er die Datenbank nicht kompromittiert hat - jedes Gerät, das er anzugreifen versucht, nachentwickeln (reverse-engineer) müsste. Das wiederum bedeutet, dass jedes System, das Schwachstellen in der Software solchermaßen ausnutzt, eine schlechte Skalierbarkeit aufweist. Somit vermag eine entsprechende Ausführungsform der Erfindung insbesondere die durch Vielanfragen in cyberphysikalischen Systemen verbreitete Verweigerung von Internetdiensten (distributed denial of service, DDoS) wirkungsvoll abzuwenden.According to a further aspect, it may be provided to associate the randomly generated attribute value in a database with the respective device. As a result, the hacker's effort for a successful attack increases substantially linearly with the number of devices he wants to attack. This follows from the fact that the hacker, unless he has compromised the database, would have to redevelop (reverse-engineer) any device he tries to attack. This, in turn, means that any system that exploits software vulnerabilities in such a way has poor scalability. Thus, a corresponding embodiment of the invention is able, in particular, to effectively avert the denial of Internet services (distributed denial of service, DDoS) that is widespread as a result of multiple requests in cyber-physical systems.

Im Ergebnis lassen sich die Sicherheitsrisiken für beliebige miteinander verbundene Systeme auf die beschriebene Weise beträchtlich mindern, indem von vornherein der ökonomische Anreiz zum Angriff auf diese Systeme beseitigt wird. As a result, the security risks for any interconnected systems can be significantly reduced in the manner described by eliminating from the outset the economic incentive to attack these systems.

Figurenlistelist of figures

Ausführungsbeispiele der Erfindung sind in den Zeichnungen dargestellt und in der nachfolgenden Beschreibung näher erläutert. Es zeigt:

  • 1 das Flussdiagramm eines Verfahrens gemäß einer Ausführungsform.
  • 2 schematisch einen ersten Prozess des Verfahrens.
  • 3 schematisch einen zweiten Prozess des Verfahrens.
Embodiments of the invention are illustrated in the drawings and explained in more detail in the following description. It shows:
  • 1 the flowchart of a method according to an embodiment.
  • 2 schematically a first process of the method.
  • 3 schematically a second process of the method.

Ausführungsformen der ErfindungEmbodiments of the invention

Im Folgenden wird der Begriff „Datei“ in einem weiten Sinne für die Eingabedaten eines vernetzten Gerätes verwendet. Als Beispiele für Dateien seien etwa ein Software-Update, eine Multimediadatei oder eine - möglicherweise eine Anforderung an das Gerät enthaltende - Textdatei genannt. Im Allgemeinen besteht jede Datei aus Kopfdaten und Nutzdaten. Die Nutzdaten der Datei betreffen deren eigentlichen Inhalt, z. B. ein Bild, einen Film oder einen Text. Der Kopf der Datei enthält deren sogenannte Metadaten wie ihr Format, die Version der Werkzeuge, die zu ihrer Erstellung verwendet wurden usw.In the following, the term "file" is used in a broad sense for the input data of a networked device. As examples of files may be mentioned as a software update, a multimedia file or a possibly containing a request to the device - text file. In general, each file consists of header data and payload data. The user data of the file relate to their actual content, eg. A picture, a movie or a text. The header of the file contains its so-called metadata, such as its format, the version of the tools used to create it, and so on.

Ein grundlegender Aspekt der Erfindung besteht darin, eine gegebene Datei so an ein bestimmtes Gerät zu binden, dass die Datei ausschließlich auf diesem vorgesehenen Gerät korrekt verarbeitet (d. h. gelesen und interpretiert) werden kann. Eine Übersicht der hierzu vorgeschlagenen Methode ist in 1 dargestellt.A basic aspect of the invention is to bind a given file to a particular device so that the file can be properly processed (ie read and interpreted) only on that intended device. An overview of the proposed method is in 1 shown.

Aus Gründen der Einfachheit sei eine prototypische Umsetzung dieses Konzeptes nunmehr anhand eines mit Nutzerrechten ausführbaren Dateisystems (Filesystem in Userspace, FUSE) illustriert. Das Prinzip lässt sich leicht an alle anderen Dateizugriffsmechanismen anpassen. Alternative Implementierungen könnten darauf basieren, die Dateizugriffs-Programmierschnittstelle (application programming interface, API) des Gerätes zu modifizieren oder etwaige in einem ausführbaren und ladbaren Format (executable and linkable format, ELF) für den Dateizugriff vorinstallierte Bibliotheken mittels des LD_PRELOAD-Mechanismus des dynamischen Laders zu ersetzen. Eine auf assoziativer Dateiverwaltung („Datenbankdateisystem“) fußende Implementierung indes mag sich etwa gerätespezifischer SQL-Anweisungen bedienen, ohne den Rahmen der Erfindung zu verlassen.For reasons of simplicity, a prototypical implementation of this concept is now illustrated by a user-executable file system (file system in userspace, FUSE). The principle is easily adaptable to all other file access mechanisms. Alternative implementations could be based on modifying the device's application programming interface (API) or any libraries pre-loaded in executable and linkable format (ELF) for file access using the LD_PRELOAD dynamic loader mechanism to replace. However, an associative file management ("database file system") -based implementation may use such as device-specific SQL statements without departing from the scope of the invention.

FUSE im Besonderen ist eine Software-Schnittstelle für Unix-ähnliche Betriebssysteme, die nicht-privilegierten Benutzern die Erstellung eigener Dateisysteme ohne Bearbeitung des Kernel-Codes erlaubt. Erreicht wird dies durch mit Standardrechten ausgestatteten Dateisystemcode, indem das FUSE-Modul lediglich eine Brücke zu den eigentlichen Kernel-Schnittstellen schlägt.FUSE in particular is a software interface for Unix-like operating systems that allows non-privileged users to create their own file systems without editing the kernel code. This is achieved by using file system code with standard rights, as the FUSE module merely bridges the actual kernel interfaces.

Zu diesem Zweck wird für ein bestimmtes Gerät (d) ein einzigartiges Schnittstellenmodul erzeugt. Eine mögliche Realisierung dieses Schnittstellenmodules ist folgendem C-Quelltextmodul zu entnehmen:

  • 1 // simple fuse filesystem expecting a fixed prefix in filename
  • 2 // to open file written by Heiko Baur & Paul Duplys
  • 3 #define FUSE_USE_VERSION 26
  • 4 #include <fuse.h>
  • 5 #include <string.h>
  • 6 #include <sys/types.h>
  • 7 #include <sys/stat.h>
  • 8 #include <unistd.h>
  • 9 #include <dirent.h>
  • 10 #include <errno.h>
  • 11 #include <stdio.h>
  • 12 #include <stdarg.h>
  • 13
  • 14 // this string is used in a single device only
  • 15 #define DEVICE_SPECIFIC_SECRET „ZQXklUuTLkxQzfcflJtT_“
  • 16 #define SHADOW_FOLDER „/tmp/shadow“
  • 17
  • 18 // max file and folder length
  • 19 #define MAX_CHAR 512
  • 20
  • 21 // helper returning the current error
  • 22 #define my_error() (-errno)
  • 23
  • 24 static int my_getattr(const char *path, struct stat *stbuf) {
  • 25 char szFile[MAX_CHAR] = {0};
  • 26 if ( (strcmp(path,".")==0) || (strcmp(path,".,")==0))
  • 27 return stat(path, stbuf);
  • 28 if (strcmp(path,"/")==0) return stat(SHADOW_FOLDER, stbuf);
  • 29 while (*path==‚/‘) path++;
  • 30 sprintf(szFile, „%s/%s%s“, SHADOW_FOLDER, DEVICE_SPECIFIC_SECRET, path);
  • 31 return stat(szFile, stbuf);
  • 32 }
  • 33
  • 34 static int my_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
  • 35 off_t offset, struct fuse_file_info *fi) {
  • 36 DIR *dp; struct dirent *dirp; char szFolder[MAX_CHAR] = {0};
  • 37 sprintf(szFolder, „%s/%s“, SHADOW_FOLDER, path);
  • 38 dp = opendir(szFolder);
  • 39 if (dp==0) return my_error();
  • 40 while ((dirp = readdir(dp)) != NULL) {
  • 41 if ((strcmp(dirp->d_name,".")==0) || (strcmp(dirp->d_name,".,")==0)){
  • 42 filler(buf, dirp->d_name, NULL, 0);
  • 43 }else{
  • 44 if (strncmp(dirp->d_name, DEVICE_SPECIFIC_SECRET, strlen(DEVICE_SPECIFIC_SECRET))==0)
  • 45 filler(buf, &dirp->d_name[strlen(DEVICE_SPECIFIC_SECRET)], NULL, 0);
  • 46 }
  • 47 }
  • 48 closedir(dp);
  • 49 return 0;
  • 50 }
  • 51
  • 52 static int my_open(const char *path, struct fuse_file_info *fi) {
  • 53 char szFile[MAX_CHAR] = {0};
  • 54 while(*path==‚/‘) path++;
  • 55 sprintf(szFile, „%s/%s%s“, SHADOW_FOLDER, DEVICE_SPECIFIC_SECRET, path);
  • 56 if ((fi->fh = open(szFile, fi->flags))<0)
  • 57 return my_error();
  • 58 return 0;
  • 59 }
  • 60
  • 61 static int my_read(const char *path, char *buf, size_t size, off_t offset,
  • 62 struct fuse_file_info *fi) {
  • 63 if (lseek(fi->fh,offset,SEEK_SET)==-1) return my_error();
  • 64 return read(fi->fh,buf,size);
  • 65 }
  • 66
  • 67 // override the user functions for the fiesystem
  • 68 static struct fuse_operations fuse_example_operations = {
  • 69 .getattr = my_getattr, .open = my_open,
  • 70 .read = my_read, .readdir = my_readdir,
  • 71 };
  • 72
  • 73 // delegate main call to libfuse
  • 74 int main(int argc, char *argv[]){
  • 75 return fuse_main(argc, argv, &fuse_example_operations, NULL);
  • 76 }
For this purpose, a unique interface module is created for a particular device (d). A possible implementation of this interface module can be taken from the following C source code module:
  • 1 // simple fuse filesystem expecting a fixed prefix in filename
  • 2 // to open file written by Heiko Baur & Paul Duplys
  • 3 #define FUSE_USE_VERSION 26
  • 4 #include <fuse.h>
  • 5 #include <string.h>
  • 6 #include <sys / types.h>
  • 7 #include <sys / stat.h>
  • 8 #include <unistd.h>
  • 9 #include <dirent.h>
  • 10 #include <errno.h>
  • 11 #include <stdio.h>
  • 12 #include <stdarg.h>
  • 13
  • 14 // this string is used in a single device only
  • 15 #define DEVICE_SPECIFIC_SECRET "ZQXklUuTLkxQzfcflJtT_"
  • 16 #define SHADOW_FOLDER "/ tmp / shadow"
  • 17
  • 18 // max file and folder length
  • 19 #define MAX_CHAR 512
  • 20
  • 21 // helper returning the current error
  • 22 #define my_error () (-errno)
  • 23
  • 24 static int my_getattr (const char * path, struct stat * stbuf) {
  • 25 char szFile [MAX_CHAR] = {0};
  • 26 if ((strcmp (path, ".") == 0) || (strcmp (path, ".,") == 0))
  • 27 return stat (path, stbuf);
  • 28 if (strcmp (path, "/") == 0) return stat (SHADOW_FOLDER, stbuf);
  • 29 while (* path ==, / ') path ++;
  • 30 sprintf (szFile, "% s /% s% s", SHADOW_FOLDER, DEVICE_SPECIFIC_SECRET, path);
  • 31 return stat (szFile, stbuf);
  • 32}
  • 33
  • 34 static int my_readdir (const char * path, void * buf, fuse_fill_dir_t filler,
  • 35 off_t offset, struct fuse_file_info * fi) {
  • 36 DIR * dp; struct dirent * dirp; char szFolder [MAX_CHAR] = {0};
  • 37 sprintf (szFolder, "% s /% s", SHADOW_FOLDER, path);
  • 38 dp = opendir (szfolder);
  • If (dp == 0) return my_error ();
  • 40 while ((dirp = readdir (dp))! = NULL) {
  • 41 if ((strcmp (dirp-> d_name, ".") == 0) || (strcmp (dirp-> d_name, ".,") == 0)) {
  • 42 filler (buf, dirp-> d_name, NULL, 0);
  • 43} else {
  • 44 if (strncmp (dirp-> d_name, DEVICE_SPECIFIC_SECRET, strlen (DEVICE_SPECIFIC_SECRET)) == 0)
  • 45 filler (buf, &dirp-> d_name [strlen (DEVICE_SPECIFIC_SECRET)], NULL, 0);
  • 46}
  • 47}
  • 48 closedir (dp);
  • 49 return 0;
  • 50}
  • 51
  • 52 static int my_open (const char * path, struct fuse_file_info * fi) {
  • 53 char szFile [MAX_CHAR] = {0};
  • 54 while (* path ==, / ') path ++;
  • 55 sprintf (szFile, "% s /% s% s", SHADOW_FOLDER, DEVICE_SPECIFIC_SECRET, path);
  • 56 if ((fi-> fh = open (szFile, fi-> flags)) <0)
  • 57 return my_error ();
  • 58 return 0;
  • 59}
  • 60
  • 61 static int my_read (const char * path, char * buf, size_t size, off_t offset,
  • 62 struct fuse_file_info * fi) {
  • 63 if (lseek (fi-> fh, offset, SEEK_SET) == - 1) return my_error ();
  • 64 return read (fi-> fh, buf, size);
  • 65}
  • 66
  • 67 // override the user functions for the fiesystem
  • 68 static struct fuse_operations fuse_example_operations = {
  • 69 .getattr = my_getattr, .open = my_open,
  • 70.read = my_read, .readdir = my_readdir,
  • 71};
  • 72
  • 73 // delegate main call to libfuse
  • 74 int main (int argc, char * argv []) {
  • 75 return fuse_main (argc, argv, & fuse_example_operations, NULL);
  • 76}

Diese Implementierung akzeptiert nur Dateien, deren Namen ein bestimmtes (eindeutiges) zufälliges Präfix - im vorliegenden Beispiel die Zeichenkette „ZQXklUuTLkxQzfcflJtT“ - aufweisen. Nur Dateien mit derartigen Dateinamen werden so in dieser Ausgestaltung des Schnittstellenmodules als gültig anerkannt.This implementation only accepts files whose names have a specific (unique) random prefix-in this example, the string "ZQXklUuTLkxQzfcflJtT". Only files with such file names are recognized as valid in this embodiment of the interface module.

Die Wirkung dieser Umsetzung ist der folgenden Sequenz von Unix-Kommandozeilen und der hierdurch hervorgerufenen Standardausgabe zu entnehmen:

  1. 1 $> mkdir /tmp/fuse /tmp/shadow/
  2. 2 $> echo „illegal file“ > /tmp/shadow/illegal.txt
  3. 3 $> echo „legal device specific file“ > /tmp/shadow/ZQXklUuTLkxQzfcflJtT_legal.txt
  4. 4 $> Is -al /tmp/fuse/
  5. 5 total 16
  6. 6 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:41 .
  7. 7 drwxrwxrwt 13 root root 12288 Mar 4 21:41 ..
  8. 8 $> Is -al /tmp/shadow/
  9. 9 total 24
  10. 10 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:43 .
  11. 11 drwxrwxrwt 13 root root 12288 Mar 4 21:43 ..
  12. 12 -rw-rw-r-- 1 hba2pl hba2pl 13 Mar 4 21:42 illegal.txt
  13. 13 -rw-rw-r-- 1 hba2pl hba2pl 27 Mar 4 21:43 ZQXklUuTLkxQzfcflJtT_legal.txt
  14. 14 $> # now starting the fuse filesystem mapping /tmp/shadow to /tmp/fuse
  15. 15 $> ./secretfs /tmp/fuse/
  16. 16 $> # there only the legal files will appear without the prefix
  17. 17 $> Is -al /tmp/fuse/
  18. 18 total 8
  19. 19 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:43 .
  20. 20 -rw-rw-r-- 1 hba2pl hba2pl 27 Mar 4 21:43 legal.txt
  21. 21 $> cat /tmp/fuse/legal.txt
  22. 22 legal device specific file
  23. 23 $> # trying to access the illegal file will fail
  24. 24 $> cat /tmp/fuse/illegal.txt
  25. 25 cat: /tmp/fuse/illegal.txt: Operation not permitted
The effect of this implementation is shown in the following sequence of Unix command lines and the resulting standard output:
  1. 1 $> mkdir / tmp / fuse / tmp / shadow /
  2. 2 $> echo "illegal file"> /tmp/shadow/illegal.txt
  3. 3 $> echo "legal device specific file"> /tmp/shadow/ZQXklUuTLkxQzfcflJtT_legal.txt
  4. 4 $> Is -al / tmp / fuse /
  5. 5 totally 16
  6. 6 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:41.
  7. 7 drwxrwxrwt 13 root root 12288 Mar 4 21:41 ..
  8. 8 $> Is -al / tmp / shadow /
  9. 9 totally 24
  10. 10 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:43.
  11. 11 drwxrwxrwt 13 root root 12288 Mar 4 21:43 ..
  12. 12 -rw-rw-r-- 1 hba2pl hba2pl 13 Mar 4 21:42 illegal.txt
  13. 13 -rw-rw-r-- 1 hba2pl hba2pl 27 Mar 4 21:43 ZQXklUuTLkxQzfcflJtT_legal.txt
  14. 14 $># now starting the fuse filesystem mapping / tmp / shadow to / tmp / fuse
  15. 15 $> ./secretfs / tmp / fuse /
  16. 16 $># there only the legal files will appear without the prefix
  17. 17 $> Is -al / tmp / fuse /
  18. 18 totally 8
  19. 19 drwxrwxr-x 2 hba2pl hba2pl 4096 Mar 4 21:43.
  20. 20-rw-rw-r-- 1 hba2pl hba2pl 27 Mar 4 21:43 legal.txt
  21. 21 $> cat /tmp/fuse/legal.txt
  22. 22 legal device specific file
  23. $ 23> trying to access the illegal file
  24. 24 $> cat /tmp/fuse/illegal.txt
  25. 25 cat: /tmp/fuse/illegal.txt: Operation not permitted

Zu Demonstrationszwecken dienen hier zwei Dateien: eine (per Definition des beispielhaften FUSE-Schnittstellenmoduls) gültige Datei mit dem Dateinamen „ZQXklUuTLkxQzfcflJtT_legal.txt“ und eine ungültige Datei mit dem Dateinamen „illegal.txt“. Die vorliegende Implementierung des Dateisystems akzeptiert nur Dateien mit dem Präfix „ZQXklUuTLkxQzfcflJtT_“. Während also die gültige Datei geöffnet, ihr Inhalt betrachtet und mittels beliebiger auf dem Gerät installierter Anwendungen verarbeitet werden kann, wird der Versuch eines Zugriffes auf die ungültige Datei verhindert.For demonstration purposes, two files are used here: a file (with the definition of the example FUSE interface module) with the file name "ZQXklUuTLkxQzfcflJtT_legal.txt" and an invalid file with the file name "illegal.txt". The present file system implementation only accepts files with the prefix "ZQXklUuTLkxQzfcflJtT_". Thus, while the valid file may be opened, its contents viewed and processed by any application installed on the device, the attempt to access the invalid file is prevented.

In einem in 2 gezeigten Geräteindividualisierungsschritt (Prozess 20) wird eine Quelle (21) von (Pseudo-)Zufälligkeit verwendet, um solch einen zufälligen Attributwert (a) für ein bestimmtes Gerät (d) zu erzeugen. Das hierbei gewählte Attribut kann ein beliebiges Attribut einer Datei sein, das auf der Abstraktionsebene des Schnittstellenmodules „sichtbar“ ist. Neben dem im obigen Beispiel verwendeten Präfix des Dateinamens könnte es sich beispielsweise um die Größe der Datei oder eine Kombination aus mehreren Attributen handeln.In an in 2 device customization step shown (process 20 ) becomes a source ( 21 ) of (pseudo) randomness to produce such a random attribute value (a) for a particular device (d). The selected attribute can be any attribute of a file that is "visible" at the abstraction level of the interface module. In addition to the filename prefix used in the example above, it could be, for example, the size of the file or a combination of multiple attributes.

Der Attributwert (a) wird mit einer eindeutigen Kennung (identifier, ID) des jeweiligen Gerätes (d) assoziiert und dem Gerät (d) auf diese Weise in einer Datenbank (Db) für eine spätere Abfrage dauerhaft zugeordnet. Gleichzeitig wird der Attributwert (a) dem Schnittstellenmodul, das für das Gerät (d) gebaut wird, wie im obigen Beispiel gleichsam „eingeprägt“.The attribute value (a) is associated with a unique identifier (identifier, ID) of the respective device (d) and permanently assigned to the device (d) in a database (Db) for a later query. At the same time, the attribute value (a) is as it were "impressed" on the interface module built for the device (d), as in the example above.

Angenommen sei nun der Fall, dass z. B. ein Software-Update durchgeführt werden soll, während sich das Gerät (d) im Einsatz befindet. Dann wird in einem in 3 gezeigten Dateianpassungsschritt (30) der Attributwert (a) für das Gerät (d) aus der Datenbank (Db) abgerufen. Das betreffende Attribut der Datei (f), die an das Gerät (d) gebunden werden soll, wird von einer Anpassungsfunktionseinheit (31) auf den gerätespezifischen Wert gesetzt oder entsprechend modifiziert. Das Ergebnis dieses Schrittes ist also eine Datei (fd), die nur vom Gerät (d) korrekt verarbeitet werden kann.Suppose now the case that z. B. a software update is to be performed while the device (d) is in use. Then in an in 3 shown file adaptation step ( 30 ) the attribute value (a) for the device (d) is retrieved from the database (Db). The relevant attribute of the file (f) to be bound to the device (d) is supplied by an adaptation function unit ( 31 ) is set to the device-specific value or modified accordingly. The result of this step is therefore a file (f d ) that can only be processed correctly by the device (d).

ZITATE ENTHALTEN IN DER BESCHREIBUNG QUOTES INCLUDE IN THE DESCRIPTION

Diese Liste der vom Anmelder aufgeführten Dokumente wurde automatisiert erzeugt und ist ausschließlich zur besseren Information des Lesers aufgenommen. Die Liste ist nicht Bestandteil der deutschen Patent- bzw. Gebrauchsmusteranmeldung. Das DPMA übernimmt keinerlei Haftung für etwaige Fehler oder Auslassungen.This list of the documents listed by the applicant has been generated automatically and is included solely for the better information of the reader. The list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions.

Zitierte PatentliteraturCited patent literature

  • DE 102015225651 A1 [0004]DE 102015225651 A1 [0004]

Claims (10)

Verfahren (10) zum Schützen eines Gerätes (d), gekennzeichnet durch folgende Schritte: - ein Dateisystem des Gerätes (d) wird individualisiert (20) und - eine von dem Gerät (d) zu verarbeitende Datei (f) wird an die individualisierte Laufzeitumgebung angepasst (30).Method (10) for protecting a device (d), characterized by the following steps: - a file system of the device (d) is individualized (20) and - a file (f) to be processed by the device (d) is sent to the customized runtime environment adjusted (30). Verfahren (10) nach Anspruch 1, dadurch gekennzeichnet, dass das Individualisieren (10) folgende Schritte umfasst: - mittels eines Zufallszahlengenerators (21) wird ein zufälliger Attributwert (a) erzeugt und - der Attributwert (a) wird in einer Datenbank (Db) dem Gerät (d) zugeordnet.Method (10) according to Claim 1 , characterized in that the individualizing (10) comprises the following steps: - a random attribute value (a) is generated by means of a random number generator (21) and - the attribute value (a) is assigned to the device (d) in a database (Db). Verfahren (10) nach Anspruch 2, dadurch gekennzeichnet, dass das Individualisieren (20) ferner folgende Schritte umfasst: - ein Quellkode (22) des Dateisystems wird durch eine Individualisierungsfunktionseinheit (23) anhand des Attributwertes (a) parametrisiert und - der parametrisierte Quellkode (22) wird in ein gerätespezifisches Schnittstellenmodul überführt.Method (10) according to Claim 2 , characterized in that the individualizing (20) further comprises the following steps: - a source code (22) of the file system is parameterized by an individualization function unit (23) on the basis of the attribute value (a) and - the parameterized source code (22) becomes a device-specific interface module transferred. Verfahren (10) nach Anspruch 3, dadurch gekennzeichnet, dass das Anpassen (30) folgende Schritte umfasst: - der dem Gerät (d) zugeordnete Attributwert (a) wird aus der Datenbank (Db) abgerufen und - die Datei (f) wird durch eine Anpassungsfunktionseinheit (31) anhand des Attributwertes (a) in eine gerätespezifische Datei (fd) überführt.Method (10) according to Claim 3 characterized in that the fitting (30) comprises the steps of: - the attribute value (a) associated with the device (d) is retrieved from the database (Db) and - the file (f) is determined by an adaptation function unit (31) Attribute value (a) in a device-specific file (f d ) transferred. Verfahren (10) nach Anspruch 4, gekennzeichnet durch folgendes Merkmal: - die Datei (f) wird in die gerätespezifische Datei (fd) überführt, indem der Attributwert (a) einem Attribut der Datei (f) zugewiesen wird.Method (10) according to Claim 4 characterized by the following feature: the file (f) is transferred to the device-specific file (f d ) by assigning the attribute value (a) to an attribute of the file (f). Verfahren (10) nach einem der Ansprüche 3 bis 5, gekennzeichnet durch mindestens eines der folgenden Merkmale: - das Attribut umfasst einen Namen der Datei (f) oder - das Attribut umfasst eine Größe der Datei (f).Method (10) according to one of Claims 3 to 5 characterized by at least one of the following features: - the attribute comprises a name of the file (f) or - the attribute comprises a size of the file (f). Verfahren (10) nach einem der Ansprüche 3 bis 6, gekennzeichnet durch mindestens eines der folgenden Merkmale: - das Schnittstellenmodul umfasst ein Treibermodul, - das Schnittstellenmodul umfasst eine Programmierschnittstelle, - das Schnittstellenmodul umfasst eine dynamische Bibliothek oder - das Schnittstellenmodul umfasst eine Datenbankabfrage.Method (10) according to one of Claims 3 to 6 characterized by at least one of the following features: the interface module comprises a driver module, the interface module comprises a programming interface, the interface module comprises a dynamic library, or the interface module comprises a database query. Computerprogramm, welches eingerichtet ist, das Verfahren (10) nach einem der Ansprüche 1 bis 7 auszuführen.Computer program, which is arranged, the method (10) according to one of Claims 1 to 7 perform. Maschinenlesbares Speichermedium, auf dem das Computerprogramm nach Anspruch 8 gespeichert ist.Machine-readable storage medium on which the computer program is based Claim 8 is stored. Vorrichtung, die eingerichtet ist, das Verfahren (10) nach einem der Ansprüche 1 bis 7 auszuführen.Apparatus arranged to perform the method (10) according to any one of Claims 1 to 7 perform.
DE102017214584.6A 2017-08-22 2017-08-22 Method and device for protecting a device Pending DE102017214584A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
DE102017214584.6A DE102017214584A1 (en) 2017-08-22 2017-08-22 Method and device for protecting a device
PCT/EP2018/071052 WO2019038052A1 (en) 2017-08-22 2018-08-02 Method and apparatus for protecting a device
CN201880054442.0A CN110945507A (en) 2017-08-22 2018-08-02 Method and apparatus for protecting a device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102017214584.6A DE102017214584A1 (en) 2017-08-22 2017-08-22 Method and device for protecting a device

Publications (1)

Publication Number Publication Date
DE102017214584A1 true DE102017214584A1 (en) 2019-02-28

Family

ID=63113536

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102017214584.6A Pending DE102017214584A1 (en) 2017-08-22 2017-08-22 Method and device for protecting a device

Country Status (3)

Country Link
CN (1) CN110945507A (en)
DE (1) DE102017214584A1 (en)
WO (1) WO2019038052A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015225651A1 (en) 2015-12-17 2017-06-22 Robert Bosch Gmbh Method and apparatus for transmitting software

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7051200B1 (en) * 2000-06-27 2006-05-23 Microsoft Corporation System and method for interfacing a software process to secure repositories
US7290149B2 (en) * 2003-03-03 2007-10-30 Microsoft Corporation Verbose hardware identification for binding a software package to a computer system having tolerance for hardware changes
CN100479004C (en) * 2005-05-27 2009-04-15 佛山市顺德区顺达电脑厂有限公司 File security method
CN102047220B (en) * 2008-05-23 2014-12-17 爱迪德加拿大公司 System and method for generating white-box implementations of software applications
CN102214282A (en) * 2011-05-27 2011-10-12 苏州海客科技有限公司 Protection method suitable for multimedia data files in portable system
CN103401931B (en) * 2013-08-05 2017-07-25 天闻数媒科技(湖南)有限公司 A kind of method and system for downloading file
CN106446715A (en) * 2016-10-11 2017-02-22 武汉斗鱼网络科技有限公司 File encryption method and device
CN106845231B (en) * 2016-12-30 2020-05-19 北京瑞星网安技术股份有限公司 Safety protection method and device based on virtualization environment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015225651A1 (en) 2015-12-17 2017-06-22 Robert Bosch Gmbh Method and apparatus for transmitting software

Also Published As

Publication number Publication date
CN110945507A (en) 2020-03-31
WO2019038052A1 (en) 2019-02-28

Similar Documents

Publication Publication Date Title
DE60121831T2 (en) SYSTEM AND METHOD FOR CONTROLLING ACCESS TO DIGITAL CONTENTS, INCLUDING STREAMING MEDIA
DE69736697T2 (en) Method and apparatus for controlling access to system resources
DE60212920T3 (en) METHOD AND SYSTEM FOR MANAGING DIGITAL SUBSCRIPTION RIGHTS
DE60102555T2 (en) PREVENTING MAP-ENABLED MODULAR MASKER ATTACKS
DE112011101831B4 (en) Protection against cross-website scripting attacks
DE102013203126B4 (en) System, method and program product for transparent access to encrypted non-relational data in real time
DE60219706T2 (en) Method and apparatus for attaching an electronic signature to a structured document
DE112011103164T5 (en) Data distribution device, data distribution system, client device, data distribution method, data reception method, program and data carrier,
DE102011077218B4 (en) Access to data stored in a cloud
WO2010060985A2 (en) Method system and simulation or analysis model for data processing
DE112017004160T5 (en) Protecting a Web server from an unauthorized client application
DE10304412A1 (en) Electronically signed documents with inspection software
DE19953055C2 (en) Device and method for the protected output of an electronic document via a data transmission network
EP1164475A2 (en) Method to install software in hardware
WO2003025758A2 (en) Device and method for establishing a security policy in a distributed system
EP3937039A1 (en) Method for the extended validation of a container image
EP1839136A1 (en) Generation of a program code in a load format and provision of an executable program code
DE102017214584A1 (en) Method and device for protecting a device
DE102005046696B4 (en) A method for generating protected program code and method for executing program code of a protected computer program and computer program product
EP3497606B1 (en) Individual encryption of control commands
EP2491513B1 (en) Method and system for making edrm-protected data objects available
DE102013019487A1 (en) Methods, devices and system for online data backup
DE102004027616A1 (en) Method for encrypting and decrypting character strings
DE102017214591A1 (en) Method and device for protecting a device
DE102005047133A1 (en) Document data processing method, involves storing electronic data file that contains document data, where document data represents document displayable for user, and converting data file into multiple electronic data files

Legal Events

Date Code Title Description
R012 Request for examination validly filed