Return to search

Making ASN.1 (Abstract Syntax Notation One) human-readable : Investigative and practical study to generalize decoding and manual validation of ASN.1 from the cellular network during run time

ASN.1 is a powerful formal notation divided into two parts, a specification of the data and the data itself in binary form. Creating decoders for these files can often be tedious. The purpose of this degree work is to extend current tools at Arctic Group to make an application that decodes a range of different ASN.1 specifications and data. This should be done during runtime, without needing to rebuild the application for each specification, while generating human-readable data and abstracting unwanted information. Two ways to create ASN.1 decoders were identified, and the application was designed taking heavy inspiration from a solution that stores intermediate data in a list. By not including encoding as a feature of the application a few shortcuts could be made, and the desired result could be achieved during runtime. The application was designed to include three parts. The first part was an ASN.1 parser using the Java-based tool ANTLR4. The second part matched the binary data to the information in the specification. The final part was an output formatter that abstracts and prettifies the output data to text files. The result was an application that parses at least three of the most commonly used specifications of the employer and does only have to be rebuilt when a new data type is present in the specifications. Problems arose when matching the data to the ASN.1 specifications, thus the matching and output formatting was only partially implemented. The application was evaluated by testing many different ASN.1 specifications, making sure everything was generated correctly during runtime and extending the parser to support more syntax as it was introduced in new specifications. Although the application did not support any arbitrary ASN.1 specification, it could serve as a foundation for further development to make the application truly generalized. / ASN.1 är en kraftfull formell notation uppdelad i två delar. En specifikation av data och medföljande data i binär form. Att skapa avkodare till dessa filer kan ofta vara tidskrävande. Syftet med det här examensarbetet är att vidareutveckla nuvarande verktyg på Arctic Group till en applikation som avkodar ett flertal olika ASN.1-specifikationer och data. Detta skall göras under körning och skall inte kräva att applikationen byggs om för varje specifikation. Applikationen skall även generera mänskligt läsbar utdata och abstrahera bort oönskad information. Två sätt att bygga en ASN.1-avkodare hittades under förstudien och applikationen designades med inspiration av en lösning som sparar data i en mellanliggande lista. Genom att inte inkludera kodning av data i applikationen kunde genvägar tas och det önskade resultatet kunde uppnås under körning. Applikationen designades med tre delar. Den första delen var en ASN.1-läsare som använde verktyget ANTLR4 byggt i Java, den andra en del som matchade informationen från specifikationen till den binära datan. Den sista delen var en formaterare för utdata som även abstraherade bort oönskad information. Resultatet blev en applikation som korrekt läser av minst tre av de mest använda ASN.1-specifikationerna hos uppdragsgivaren och som bara behöver byggas om då en ny datatyp introduceras i specifikationerna. Problem uppstod vid matching av data till specifikationen vilket ledde till att matchningen och formateringen blev bara delvis implementerat. Applikationen utvärderades genom att testa många olika ASN.1 specifikationer, kontrollera att allt genererades korrekt under körning och att utöka läsaren efterhand för att kunna hantera mer syntax då den introducerades i de nya specifikationerna. Även om applikationen inte än stödjer godtycklig ASN.1-specifikation kan den verka som en bas för vidareutveckling mot en mer komplett generaliserad lösning.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:ltu-67595
Date January 2018
CreatorsJilläng, Emil
PublisherLuleå tekniska universitet, Institutionen för system- och rymdteknik
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageSwedish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0023 seconds