A Talk About Java Serialization and Deserialization
Tags: applicationsecurity, java
Published: 2022-10-29 05:40:10

---
title: A Talk About Java Serialization and Deserialization
published: true
date: 2022-10-29 20:14:00 UTC
tags: ApplicationSecurity,java
canonical_url: https://tutorialboy24.blogspot.com/2022/09/a-talk-about-java-serialization-and.html
---

  

  

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRY2QOWo-B9erbiZx2KWGj_sclR5lkWAfmku9sqeE8GZ4PMNaSbNPZNl8aYWkEsLU1x2XZYfDaag2z6LYdqIP2T9v3BWxHBo-PMeBKpPtVSX2nvFfquWNs7UyxwduHYPAjMh47ba6KL9a9KOJ2cQqL6_YUciXTWUhROVGbVrMbdvdt6xZYRKJM_4MalQ/w640-h360/TUTORIALBOY%20(1).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRY2QOWo-B9erbiZx2KWGj_sclR5lkWAfmku9sqeE8GZ4PMNaSbNPZNl8aYWkEsLU1x2XZYfDaag2z6LYdqIP2T9v3BWxHBo-PMeBKpPtVSX2nvFfquWNs7UyxwduHYPAjMh47ba6KL9a9KOJ2cQqL6_YUciXTWUhROVGbVrMbdvdt6xZYRKJM_4MalQ/s1280/TUTORIALBOY%20(1).png)
  
 

## Preface

The current popularity of Java security can be said to be a must-know for the red team. I once fell into the beginning of learning Java security - learning CC chain - giving up - starting to learn Java again The vicious circle of safety is like memorizing words and always stops at abandon. Finally, after seeing a blog of senior scz, I made up my mind.

## Basic Use

The concepts of serialization and deserialization are no longer introduced, let's look at the user directly.

For a class to be serializable, it needs to implement the **Serializable** and **Externalizable** interfaces, the former being an empty interface:

```
public interface Serializable {  
}
```

It is only used to identify that this class can be serialized, the latter inheriting the former.

  

The serialization steps of a Java object:

- Create one  that can wrap an output stream of another typejava.io.ObjectOutputStream

- writeObjectwrite an object through its  methods

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibU0M93yuAPZjYye5AgPjlgARufmazISvp-bDM2c4sgZFMHR1hNWIDz7bpNtbByfVrWuXErQTCC7tGVDl6Hlme3YG6GlWOXaeBo9VIbNcoiAc5ZFUIr0Ga7yfhDodXChAIFVx6BxAYOwCb_J03deGjLBWnVYnY-vfYaLucPxDq-CAkE3AagCBjLHMy9g/s16000/carbon.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibU0M93yuAPZjYye5AgPjlgARufmazISvp-bDM2c4sgZFMHR1hNWIDz7bpNtbByfVrWuXErQTCC7tGVDl6Hlme3YG6GlWOXaeBo9VIbNcoiAc5ZFUIr0Ga7yfhDodXChAIFVx6BxAYOwCb_J03deGjLBWnVYnY-vfYaLucPxDq-CAkE3AagCBjLHMy9g/s1336/carbon.png)

  

Steps to deserialize a Java object:

- Create one that can wrap an input stream of another type **java.io.ObjectInputStream**

- **readObject** Read an object through its  methods

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl6tzCZGyJn2XfxAOMTwJN94whx9jRw5zFyhMMeXVHaiZyclRkgpmf6YbfCGbn6oQBap5xsLxbtLgWecsRTlDzqPtNLKCJxuf8n21iSaK6-NYIZjOCnShGkF1vjSZTJRq-IQaEeWaeOMMMCn-VrsuNRopZR4GxmL3xv0s1Kjp_Ijf-qz3k6w52jx1bxA/s16000/carbon%20(1).png)

## Serialized Data Format

Write the serialized data to a file and observe:[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqR7OGBBzVL9dKH_tcyxvPhhIXavjlGye2W_9t9Rd9isqUHKsGgGASS4fkbtvOrrOoFrmX0nA18R8mrowxcIGWCihs3IC7pTNtvM4GW0I9Yjy_XT5Hefa-f9kOuAqQuWXbMnRLs5_vMsTy8cKQ8L2WFzxfIPzFWnp9Nfqfkj4aRIIwGSNbfoCDd7jXQ/s16000/carbon%20(2).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjqR7OGBBzVL9dKH_tcyxvPhhIXavjlGye2W_9t9Rd9isqUHKsGgGASS4fkbtvOrrOoFrmX0nA18R8mrowxcIGWCihs3IC7pTNtvM4GW0I9Yjy_XT5Hefa-f9kOuAqQuWXbMnRLs5_vMsTy8cKQ8L2WFzxfIPzFWnp9Nfqfkj4aRIIwGSNbfoCDd7jXQ/s1624/carbon%20(2).png)

  

You can see that there are some readable strings, including the class name and some member variable names and values.

  

Using the tool: **SerializationDumper** serialized data can be easily restored, such as for the original flow file:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgASEOEZGJw396l5IxrGrpZqt-1CrJT-D1nMbmRIfJj9fdwF4aj6_5dFQ1rQ0ZNPGMfEnhcq_61y29NKO0ej33Ms6X6OvYh6HOo1KlFqWyJ2EBUCevobDvU1zSJIM9udyWuNtS2Vu1q2FkB-0JYtjbnNI1atzBNL2c_fMWawWSLamkDa0FeaRZdcjJTvA/w640-h306/ter.png)

  

For hexadecimal data:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYhQwZqaRvJYt6aSiDblAWOSCGKWNqYtfhFwfUQYZzeD7A-duqd-GkCz6iuwLF8EW4SSRlLFLD8Ap9j7XUgZ1v3qxe7XOAHs93kKOg9K-S5b17_xA34YeZ45jWCdak9X1lhijWIMVUMdpfnIab-xapHkYMfsYQisf7iDDhzu5RtF-LZEzkTkfYm5Svag/w640-h272/term.png)

  

Complete input:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7BWoFahn1ZndpegaAeMrjy5dnZKUirgps7sv2vJ36j_gMapH5x_w4YQLAiw2KMmG5DLRCZh4EQ4AO1I1d6E60sfSfXCJrWdIxfvZzd0fAbkvBZIOw0nI8FplyA-jYhDLd0kHropstNO3aUAr7HBR-IRq8vn83UOFhqmRYph4C9nV02vHk30L6u9NASg/w406-h640/co.png)

  

In contrast to the Object Serialization Stream Protocol [2] section in Oracle's official documentation, let's discuss the structure of the following serialized data.

  

The first place is the Magic Number and the protocol version. You can see the definition in the ObjectStreamConstantsinterface :

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA4Vtjv7EYBvyFjXnsZW7fTMmKQrdHJ2fSvo3pcdZxO5RneQBkqZZI4z4hLhjLVfiz5bLxbxv-wTUs5legrduGG3We9Xqp7S_MZSEhgP6cm6iIVhUOAh4u99k1hOhX79e2UWwyrHPgAncQbdGfrpX4BljQUb-7SvCTnC8JFsr-ilNgApaZAHEBUt-_aA/w640-h312/codei.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA4Vtjv7EYBvyFjXnsZW7fTMmKQrdHJ2fSvo3pcdZxO5RneQBkqZZI4z4hLhjLVfiz5bLxbxv-wTUs5legrduGG3We9Xqp7S_MZSEhgP6cm6iIVhUOAh4u99k1hOhX79e2UWwyrHPgAncQbdGfrpX4BljQUb-7SvCTnC8JFsr-ilNgApaZAHEBUt-_aA/s855/codei.png)

  

followed by contents, i.e., one or more content, the latter consisting of objector block data.

  

objectThe content inside is the core of serialized data and consists of any of the following:

- newObject: object

- newClass: kind

- newArray: Array

- newString: String

- newEnum: enumeration type

- newClassDesc: class definition

- prevObject: a reference to a type

- nullReference:null

- exception:abnormal

- TC\_RESET: reset ReferenceID

See new object the :

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9hcna2Oa74ENks6ydriplDeCf3-wRLfXje1_FikPVzVFFtl2rDawq9qBNUgLfEmAsAQUxDdZ9zrZ5UsdQ3UKXutX5jTORLr4XokjQbw3siON8Rp9jpAEeC9Du4akfjB2v8UTtE5OrQRR8A8hIHfVv1TSi7NWWlnvoKG7bJB4LK4u8FKZ5SEIv33CZHw/w640-h134/carbon%20(9).png)

  

We use the above example to compare, Contents which contains one newObject, TC\_OBJECTafter is classDesc, which contains the class name and length, serialVersionUID, attribute name and length, parent class, and other information. After this is newHandle and, the former is the unique ID of the current structure in the serialized data, and the latter is the information in the serialized object.classdata[]

  

newClassDescand classDesc are not the same, as can be seen from the definition:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji0aJiGT_v6QdeIjLSyv62HPpVRwd7FVom55p32fnLu_cO8TGN1utZkYmii0IXMzALyD4kvYI8sWpGyTuI1rYVAcR2xEIXoRDQr7t565RRcZke2O3qmMtF-cWagw5Fbw-1o2f0DVvlYmEiixpLI2yVkQsJ9Dbo5fkzd0WPIPH_uHof2q1J4qg6KYpLQw/s16000/carbon%20(10).png)

  

classDescEquivalent to newClassDescthe encapsulation of, which can newClassDescbe either a null or a pointer to a class definition.

  

At this point, you may be wondering, why should I read this boring document? Why didn't you start talking about the CC chain?

  

There are three reasons why you need to learn more about serialized data structures:

- Helps to understand the principle of bypassing WAF by filling garbage characters in serialized data

- Helps to learn about JDK 8u20 native deserialization vulnerabilities later

- Maybe you will run into situations where you need to use other languages ​​to do Java deserialization exploits

## The Effect of The Attribute

When serializing in PHP, the scope of variables will affect the serialized data, so is there a similar situation in Java?

  

Add two variables to the Personclass :

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ZPLxBbkumjfuCyZnyrRjhKdkbmmlHfuTCim1SHzMyJc8Yvli7gwZZxBNYlqd_zGwK_2vt53qZcJWqKqJEjxaNZq_JfeHeuZanezAEbVAQFLsMVqS2tRTmcMNmo87wYP8BgHOdLs3-q5yeLn4wyFKkWudAmo91scwRGrwirMavsaveqXB0RJLQa8M9w/w640-h286/carbon%20(11).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ZPLxBbkumjfuCyZnyrRjhKdkbmmlHfuTCim1SHzMyJc8Yvli7gwZZxBNYlqd_zGwK_2vt53qZcJWqKqJEjxaNZq_JfeHeuZanezAEbVAQFLsMVqS2tRTmcMNmo87wYP8BgHOdLs3-q5yeLn4wyFKkWudAmo91scwRGrwirMavsaveqXB0RJLQa8M9w/s980/carbon%20(11).png)

  

After observing the serialized data, it is found that neither of these two variables exists:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOfoAaFNAs4AMy8etoyuE-omAP0A3jBlnb3l_2C-d6ToSN4LHiP0KD-bcLsv3ujF1dcXTWfqcaJN2xAwB-DiFMgcttIjQn_3kkV0GTG691inD9urmjb1Au3yFF_j-l1K7_HhEe90OqkDekYlN-DE8F78Y-NV-W5hNl8hXR10CP6yD4U4d_R7eLVrW9w/w640-h398/term.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOfoAaFNAs4AMy8etoyuE-omAP0A3jBlnb3l_2C-d6ToSN4LHiP0KD-bcLsv3ujF1dcXTWfqcaJN2xAwB-DiFMgcttIjQn_3kkV0GTG691inD9urmjb1Au3yFF_j-l1K7_HhEe90OqkDekYlN-DE8F78Y-NV-W5hNl8hXR10CP6yD4U4d_R7eLVrW9w/s643/term.png)

  

Variables modified by the static or transient keyword will not appear in the serialized data, this is for some sensitive data considerations.

  

But if you try to call these two variables after deserialization, you can see addressnormal output, while password is null:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9gXBslDZ83B-TRtKY-G8TuaMZkgHq5YUKesOzIlFfNH3ZTQ_nNqxKllvSgszdXs45DxY8Lo_SxMZZXJq7GOfhWSjvrfUiO6qMkd4YFrVtL1K9g_lW6tMId3mG77vKSnvZoMWnyuFtKYejUhqy93Iw1zHuO6qkU0WabqPlsNTm3mv2PRJLOmWK1UcjFQ/w640-h334/jb.png)

This is because addresses a static variable, and its value registered in the JVM is called, not the value obtained after serialization.

  

If you want to serialize variables modified by the transient keyword , you need to use the Externalizableinterface:

  

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAZz311-3IK_qfOuDzQi9MkWxtMHUmI-oMmn_xrRWad0yaVMaosIQ9UOcrQPGR031zeeiUl5MBQeq54g-Wt8BulDk2T3PhZoy6BYao3vBBafq4BtI_N7dVAWW1FpgZBlTMegx5ppYXBjlxYxIclRaOAQosHMnny5y1VQugQWjW4hXFVMVxfFdsvEdTTw/w612-h640/cd.png)

  

Here, if used to parse, the following error will occur:test.rawSerializationDumper

  

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs8U7mrhgumMIsb40ewo3_okZ9TDApp4vpgPs1hct9-StAZBrI7L5eMEz1GJ9C42uKy-KyMNSDusr_0MgsTw3rNA8pIdbQdsZdVwhawCJH91R9Da4gPU-wV3w2gXHLciLEQCSDOVdRl6tDC1t1xJ_Sp4vD1KnTq6C9zI7K1ExyuPfK3mBOeRCa6oIpjQ/w640-h368/2022-09-19_09-39.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs8U7mrhgumMIsb40ewo3_okZ9TDApp4vpgPs1hct9-StAZBrI7L5eMEz1GJ9C42uKy-KyMNSDusr_0MgsTw3rNA8pIdbQdsZdVwhawCJH91R9Da4gPU-wV3w2gXHLciLEQCSDOVdRl6tDC1t1xJ_Sp4vD1KnTq6C9zI7K1ExyuPfK3mBOeRCa6oIpjQ/s533/2022-09-19_09-39.png)

  

The reason is that a class that implements the Externalizable interface , whose serialization is writeExternalwritten to the stream through the method, must also be parsed through the corresponding readExternalmethod, so SerializationDumpersuch serialized data cannot be parsed without providing the original class.

  

## ObjectStreamClass analysis

ObjectStreamClass It can be used to analyze the serialization characteristics of serialized classes loaded in the JVM, including field description information and serialVersionUIDetc.

  

ObjectStreamClassThere are two static methods:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPG-mbFgodVoIzV4yv724fa2Qam4j4C9JPxGlR_uFv2UHnqorCo41kd0rNa6FFO6-7mTvKpvCJXvXy32ogQc3YBVfzCRBlKzqPfp-I7Y2cBu8tvug0S9eP0xa5xw-gvlJHv5Q7CPe3rCpejXAMTKFCrBLMq0T1lrhQ4Adcn-HZNEw_AD4pz7eJej7fYw/s16000/carbon%20(6).png)

  

**lookup(Class<?>cl) ObjectStreamClass** An instance is returned if the provided class is serializable , otherwise null:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiysLRZw-UaYMlNtcqly4jNxOdvZe1az-0ekTIbBFwwOwZqgAPZb1E1wcNem47SYC3NZ_aMKqwYnIV3k8dGqrDTwSgH9ortVdXHn1A92Lx0xr_C21EX-entPEcxVgV7k6GYKgrmLnt6wrCpSOQxgFGpbOWnLi1hCxIC2prn-2Q6s_vU3pm2U2n5A9dtCQ/s16000/carbon%20(7).png)

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMUoY9J02ycc7FSIWYBriCjQAnGr3yUT7CnPf-nGE_CwjLrJ4Zk042sIk5AR78ei3di9-k-UTUtJLNPAu0TuO1_RlMIe21M-LtJ8pRKT7jGX-rOCe6xmxjWnHBFrrrFsZdGRTSqRcZZqb5Gv0UZ_sdmTpJSYCp81lf_UxHMMgp5eYfJINxRNz3V8h6cQ/s16000/carbon%20(8).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMUoY9J02ycc7FSIWYBriCjQAnGr3yUT7CnPf-nGE_CwjLrJ4Zk042sIk5AR78ei3di9-k-UTUtJLNPAu0TuO1_RlMIe21M-LtJ8pRKT7jGX-rOCe6xmxjWnHBFrrrFsZdGRTSqRcZZqb5Gv0UZ_sdmTpJSYCp81lf_UxHMMgp5eYfJINxRNz3V8h6cQ/s1948/carbon%20(8).png)

  

The method will return the corresponding instance regardless of whether the provided class is deserializable or not. **lookup any(Class<?>cl)**

  

After getting the **ObjectStreamClass** instance, you can call the corresponding method to get the information:

- **getDeclaredSUID** : Extract the serial number

- **getSerialFields** : Extract the required serialization fields, if not, extract the default fields

## About ObjectInputStream.resolveClass()

  

  

image.png

**resolveClass** The method receives an **ObjectStreamClass** instance, obtains its class name, and then uses reflection to return a **Class** instance of this class. In fact, it is allowed to replace or parse the object before returning the object during deserialization.

  

This method is overridden in Apache Shiro:

  

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTvC5fQ9r6gSfZvV9qBlmsrsL3NnyvXvq6F7R361qca0BuZ7tA2RW3Gttn1UhENXwa0IHhptl5KRMpBcF3MtShVk596N00n6A9kvI33iGyimx017jGH057uq89fibiWVRhpkS3kES_1O62sgfDDc6ikA4vVI4klq4_emhlAxyzgvFZfnr7rmCwL90a9w/s16000/carbon%20(5).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTvC5fQ9r6gSfZvV9qBlmsrsL3NnyvXvq6F7R361qca0BuZ7tA2RW3Gttn1UhENXwa0IHhptl5KRMpBcF3MtShVk596N00n6A9kvI33iGyimx017jGH057uq89fibiWVRhpkS3kES_1O62sgfDDc6ikA4vVI4klq4_emhlAxyzgvFZfnr7rmCwL90a9w/s1948/carbon%20(5).png)

  

This leads to some interesting situations when Shiro deserializes exploits, which will be discussed in detail in a later Shiro article.

  

Overriding this method is also a means of defending against deserialization vulnerabilities, such as the SerialKiller [3] project:

  

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0z4vGhlM-MYl_2ZWvmZiwncBTodlNjR9k-3Q0jO1c0i_ewtrZhFTzwi5U8i_8OlELEG15Dp1ZQ_tLnhj3nWDmOyl_klfLhrGXBjnRky3A2nFyZhcT4-nEwuSo3uHkfgpdA-_MggBCUFoEqMVIHAfPdyYce2RLVlxDDHA05XUwDg-dPT7nsvEGRZFn0g/s16000/uuggf.png)

Blacklist or whitelist defense is performed by rewriting .ObjectInputStream.resolveClass()

## readObjectNoData

During deserialization, if the superclass of the serialized class is different from the superclass of the deserialized class because the class at the time of serialization is different from the version at the time of deserialization, or because the received serialized data is incomplete, or Serialized data is harmful, and will affect the initialized object field values.

  

So a serializable class should define its own **readObjectNoData** method, which will be used **readObjectNoData** instead in the above case **readObject**. Without this method, the fields of the class are initialized to their default values.

  

For example, serialize using the current class:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjLfBVBPYh6UMDm9CaME22xJFEB_SIvsatJHkKg-iez5L9CbXajqBdk-hSc5JpUWS8jpDEMfl0bTZY_4Vb_-0JspogxRrmZbkxGmstVSJk6g0d-lrHBnOVFz28n2MYO4Se_q4tE07BPQmvmShZWcrBhTQ_5Yedg3Tme68Qk1RBqx30loQOuPV_Mx-Zw/s16000/carbon%20(4).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjLfBVBPYh6UMDm9CaME22xJFEB_SIvsatJHkKg-iez5L9CbXajqBdk-hSc5JpUWS8jpDEMfl0bTZY_4Vb_-0JspogxRrmZbkxGmstVSJk6g0d-lrHBnOVFz28n2MYO4Se_q4tE07BPQmvmShZWcrBhTQ_5Yedg3Tme68Qk1RBqx30loQOuPV_Mx-Zw/s1160/carbon%20(4).png)

  

Update this class and use the previously serialized data for deserialization:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsofXRbqTqt-PDW4WhAzW37UmCfXC1g69gYUkr9qZD93ZAlcmJTmrc4kc6ytXnXi2pNg1aZab9Qxp63YpdmQGWE8FllF1w-y0lui8dM9qHaBbJwM8ECz4qoLd7IShIG1ORIqcG-igGky1XW45gxawwaF6jxS5gujWKh8wDY0Dk9rEiuhLeoBwU8gglGw/s16000/carbon%20(3).png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsofXRbqTqt-PDW4WhAzW37UmCfXC1g69gYUkr9qZD93ZAlcmJTmrc4kc6ytXnXi2pNg1aZab9Qxp63YpdmQGWE8FllF1w-y0lui8dM9qHaBbJwM8ECz4qoLd7IShIG1ORIqcG-igGky1XW45gxawwaF6jxS5gujWKh8wDY0Dk9rEiuhLeoBwU8gglGw/s1526/carbon%20(3).png)
  

will be called instead . **readObjectNoData()**  **readObject()**

## Summary

This is the first article in "Java Security Guide ". Some places are actually a bit odd, and it is not necessarily helpful for Java security learning, but it is always right to know more, right :)

## References

- SerializationDumper:  [https://github.com/NickstaDB/SerializationDumper](https://github.com/NickstaDB/SerializationDumper)

- Object Serialization Stream Protocol:  [https://docs.oracle.com/javase/8/docs/platform/serialization/spec/protocol.html](https://docs.oracle.com/javase/8/docs/platform/serialization/spec/protocol.html)

- SerialKiller:  [https://github.com/ikkisoft/SerialKiller](https://github.com/ikkisoft/SerialKiller)