From 60c64ce58f5038323d9778af6d7f76705c495fcd Mon Sep 17 00:00:00 2001 From: Syuugo Date: Thu, 11 Apr 2024 15:18:23 +0900 Subject: [PATCH 1/2] Add build workflow --- .gitattributes | 4 +++ .github/workflows/build.yml | 47 ++++++++++++++++++++++++++++++ README.md => docs/README.md | 4 +-- debian12.png => docs/debian12.png | Bin result.png => docs/result.png | Bin writeup.docx => docs/writeup.docx | Bin writeup.pdf => docs/writeup.pdf | Bin 7 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/build.yml rename README.md => docs/README.md (92%) rename debian12.png => docs/debian12.png (100%) rename result.png => docs/result.png (100%) rename writeup.docx => docs/writeup.docx (100%) rename writeup.pdf => docs/writeup.pdf (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..292ca9d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto +*.docx binary +*.pdf binary +*.png binary diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..18fa40a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build + +on: + push: + paths: + - '.github/workflows/build.yml' + - 'ExploitGSM_5_15_to_6_1/**' + - 'ExploitGSM_6_5/**' + - 'OffsetGenerator/**' + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Install libcap-dev + run: sudo apt-get install -y libcap-dev + + - name: Compile ExploitGSM_5_15_to_6_1 + run: | + cmake ExploitGSM_5_15_to_6_1 -B ExploitGSM_5_15_to_6_1 + cmake --build ExploitGSM_5_15_to_6_1 + + - name: Compile ExploitGSM_6_5 + continue-on-error: true + run: | + cmake ExploitGSM_6_5 -B ExploitGSM_6_5 + cmake --build ExploitGSM_6_5 + + - name: Compile OffsetGenerator + run: | + cmake OffsetGenerator -B OffsetGenerator + cmake --build OffsetGenerator + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ExploitGSM + path: | + ExploitGSM_5_15_to_6_1/ExploitGSM + ExploitGSM_6_5/ExploitGSM + OffsetGenerator/OffsetGenerator diff --git a/README.md b/docs/README.md similarity index 92% rename from README.md rename to docs/README.md index 8fc4d20..74bfd64 100644 --- a/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ Exploit for 6.4 - 6.5 kernels and another exploit for 5.15 - 6.5 Перший експлоїт 5.15 до 6.5 Результат
-![alt text](https://github.com/YuriiCrimson/ExploitGSM/blob/main/debian12.png?raw=true) +![alt text](debian12.png) Debian 12 6.1 kernel Dekstop
Експлоїт не працює на всіх ядрах, наприклад на убунту. Але на Debian і Fedora @@ -21,7 +21,7 @@ Debian 12 6.1 kernel Dekstop
Другий експлоїт 6.4 до 6.5 Результат
-![alt text](https://github.com/YuriiCrimson/ExploitGSM/blob/main/result.png?raw=true) +![alt text](result.png) Ubuntu 22.04 6.5 kernel Dekstop
diff --git a/debian12.png b/docs/debian12.png similarity index 100% rename from debian12.png rename to docs/debian12.png diff --git a/result.png b/docs/result.png similarity index 100% rename from result.png rename to docs/result.png diff --git a/writeup.docx b/docs/writeup.docx similarity index 100% rename from writeup.docx rename to docs/writeup.docx diff --git a/writeup.pdf b/docs/writeup.pdf similarity index 100% rename from writeup.pdf rename to docs/writeup.pdf From 08c885d176dfbc84d75e4e28173e5f9c3500e1a1 Mon Sep 17 00:00:00 2001 From: Syuugo Date: Thu, 11 Apr 2024 22:34:26 +0900 Subject: [PATCH 2/2] Revert (17db559): Remove the redefinition of `struct gsm_dlci_config` --- .github/workflows/build.yml | 1 - ExploitGSM_6_5/main.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18fa40a..0597f7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,6 @@ jobs: cmake --build ExploitGSM_5_15_to_6_1 - name: Compile ExploitGSM_6_5 - continue-on-error: true run: | cmake ExploitGSM_6_5 -B ExploitGSM_6_5 cmake --build ExploitGSM_6_5 diff --git a/ExploitGSM_6_5/main.c b/ExploitGSM_6_5/main.c index e70e9df..9e01fb9 100644 --- a/ExploitGSM_6_5/main.c +++ b/ExploitGSM_6_5/main.c @@ -50,6 +50,16 @@ #define HEAP_SPRAY_SIZE 1024 #define BITS_PER_LONG 64 +struct gsm_dlci_config { + __u32 channel; /* DLCI (0 for the associated DLCI) */ + __u32 adaption; /* Convergence layer type */ + __u32 mtu; /* Maximum transfer unit */ + __u32 priority; /* Priority (0 for default value) */ + __u32 i; /* Frame type (1 = UIH, 2 = UI) */ + __u32 k; /* Window size (0 for default value) */ + __u32 reserved[8]; /* For future use, must be initialized to zero */ +}; + #define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config) #define GSMIOC_SETCONF_DLCI _IOW('G', 8, struct gsm_dlci_config)