• Stars
    star
    353
  • Rank 119,657 (Top 3 %)
  • Language
    Shell
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools for Red Star OS (붉은별)

Tools for Red Star OS (붉은별)

This repository includes several binaries from and tools for Red Star OS. These can be used for further research work.

Disable malicious components

The easiest way is to run the defuse.sh script on Red Star OS 3.0 Desktop (requires root privileges), make sure it's executable by running chmod u+x defuse.sh.

Manual steps

  1. Get root privileges via /usr/sbin/rootsetting

  2. Disable SELinux

    SELinux protects several files an directories (e.g. /var/log). It should be disabled in order to make changes to some parts of the system.

     setenforce 0
    

    In order to keep SELinux disabled after rebooting, append selinux=0 to the kernel line in the GRUB config file (/boot/grub/grub.conf).

  3. Kill securityd

    Killing securityd will prevent the system from rebooting when editing/deleting various protected files.

     killall -9 securityd
    
  4. Disable rtscan kernel module

    Either via resctl.py (see rtscan) or via a Python shell as follows:

     [root@localhost ~]# python
     Python 2.6 (r26:66714, Oct  7 2012, 13:39:47)
     [GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
     Type "help", "copyright", "credits" or "license" for more information.
     >>> import fcntl
     >>> fcntl.ioctl(open('/dev/res', 'wb'), 29187)
     0
    

    After disabling rtscan protected processes like opprc will become killable.

  5. Kill scnprc and opprc

     killall scnprc
     killall opprc
    
  6. Replace /usr/lib/libos.so.0.0.0

    See libos for further information. Replacing this file will prevent the system from rebooting via securityd after rebooting the system. It also will prevent reboot loops by kdm rendering the system unusable.

  7. Delete /usr/share/autostart/scnprc.desktop

    Deleting this file will prevent kdeinit from starting the framework after a system reboot.

  8. Delete /etc/init/ctguard.conf

    Deleting this file will prevent init from starting opprc even when scnprc is not running.

  9. Reboot the system

Debugging

Prepare building environment

The default installation of Red Star OS 3.0 Desktop does not include GCC but the ISO includes the required packages.

  1. Insert the Red Star OS ISO into the system

  2. Go to /media/RedStar\ Desktop\ 3.0/RedStar/RPMS

  3. Install the following packages:

     yum localinstall glibc-headers-2.10.1-2.i386.rpm
     yum localinstall glibc-devel-2.10.1-2.i386.rpm
     yum localinstall ncurses-devel-5.6-0.rs3.0.i386.rpm
     yum localinstall gcc-4.4.0-4.i386.rpm
    

Now it is possible to build a recent (e.g. the latest) version of GDB for better debugging.

Install non-stripped threading libraries

The default installation of Red Star OS 3.0 Desktop does not allow to debug threads with the shipped version of GDB in e.g. scnprc and opprc because the required libpthread.so.0 library is stripped.

Use the libpthread-2.10.1.so/libpthread.so.0 and libthread_db-1.0.so/libthread_db.so.1 libraries from the glibc-2.10.1-2.i686.rpm package of Fedora 11.

Disclaimer

All of the information is based on research dedicated to analyzing Red Star OS. The authors take no responsibility for the accuracy, completeness or quality of the information provided.

More Repositories

1

knxmap

KNXnet/IP scanning and auditing tool for KNX home automation installations.
Python
116
star
2

deen

Generic data DEcoding/ENcoding application built with PyQt5.
Python
46
star
3

python-ssllabs

Python interface and command line client for the SSL Labs APIs.
Python
42
star
4

nmap-scripts

A collection of Nmap NSE scripts.
Lua
41
star
5

ILSpy-CosturaPlugin

A plugin for ILSpy that loads references that have been embedded as resources with Costura.
C#
23
star
6

csgo-overwatcher

Investigate the actual suspects of Counter-Strike: Global Offensive Overwatch cases.
Python
20
star
7

ctfpwnng

Automation framework for attack-defense CTFs.
Shell
15
star
8

laf

Login Area Finder: scans host/s for login panels
Python
15
star
9

webfixy

On-the-fly decryption proxy for MikroTik RouterOS WebFig sessions.
Python
14
star
10

dprkdict

A web-based viewer for North Korean dictionary files provided by the E-C-K app.
Python
13
star
11

advent-calendar-2018

A technical advent calendar with CTF-like services where a new port opens every day.
JavaScript
10
star
12

ip-https-tools

Tools for the IP over HTTPS (IP-HTTPS) Tunneling Protocol
Lua
9
star
13

xss-board

A simple XSS challenge example using Zombie.js
PHP
9
star
14

woolim-tools

Collection of information related to the Woolim (울림) tablet PC
Shell
7
star
15

sstp-tools

Tools for the Secure Socket Tunneling Protocol (SSTP)
Python
6
star
16

advent-calendar-2020

A technical advent calendar with CTF-like services where a new port opens every day.
Rust
6
star
17

tools

Helper tools and snippets for various tasks.
Shell
5
star
18

writeups

A collection of technical write-ups.
1
star
19

go-empdecrypt

Decrypter for EIS passwords in Matrix42 configuration files
Go
1
star
20

kleber-cli

Kleber command line client
Python
1
star
21

workflow-test

Shell
1
star
22

kleber

Pastebin and file sharing web application
Python
1
star
23

tac_plus-pre-auth-rce

tac_plus Pre-Auth Remote Command Execution Vulnerability (CVE-2023-45239 & CVE-2023-48643)
1
star
24

go-deen

Generic data encoding/decoding application which aims to be portable and provides several (currently experimental) interfaces.
Go
1
star