이것저것

    패킷 분석 도구 Wireshark 사용법

    🦈 Wireshark 란? WireShark는 오픈소스 패킷 분석기로, 실시간 패킷 확인이 가능한 유용한 도구다!! Wireshark를 통해 제3자가 두 개체 사이의 네트워크에서 전달되는 패킷을 수신하여 저장할 수 있다. 이 패킷은 PCAP이라는 파일 포맷으로 저장된다. PCAP (Packet CAPture): 네트워크 트래픽을 캡처하는 API UNIX 계열: libpcap Windwos: Winpcap ⇒ 운영체제에서 지원하는 캡처 라이브러리 👩‍💻 Wireshark 사용하기 0️⃣ 시작 - 네트워크 인터페이스 선택 현재 자신의 기기(컴퓨터)에 설치/연결되어 있는 네트워크 어댑터들이 나온다. 그 중에서 패킷을 캡처할 인터페이스를 선택하면 된다. 1️⃣ 메뉴 차례대로 [File] [Edit] [View]..

    Python 가상환경 (virtualenv) 생성 및 실행하기

    ◽Ubuntu 20.04 (Linux) ◽Python3의 기본환경에서 Python2.7(+ python2에 맞는 pip2 설치)를 가상환경으로 만들어주고 싶다. ✍️ Python 가상환경 virtualenv 생성하기 Python과 PIP3가 설치되어 있는 상태에서 virtualenv를 설치할 수 있다. pip install virtualenv virtualenv를 무사히 설치 했다면 이제 python 가상환경을 생성할 수 있다. virtualenv --python=python2.7 별다른 문제가 없는 상태라면 현재의 디렉터리의 하위에 이라는 이름의 디렉터리가 생성될 것이다. 🚨 ERROR: has no attribute 'CPython2macOsArmFramework' AttributeError: mod..

    [USENIX] Charger-Surfing: Exploiting a Power Line Side-Channel for Smartphone Information Leakage

    1. Introduction (Summary) Charger Surfing: touch screen을 타겟으로 하여 powerline을 통한 side-channel 유출에 의한 새로운 보안 위협 특히 공공시설에서의 USB 충전기는 사용자가 관리할 수 없는 것이기 때문에 특히 보안 위협에 노출되기 좋다. 데이터라인(dataline)을 통해 전송되는 데이터를 전력선에서의 crosstalk 유출에 의해 탈취 혹은 감시할 수 있다. 공격자는 전력선(powerline)에서 전력 소비 정보를 추출해 인터넷 검색 기록, 비밀번호 길이 등의 구체적인 정보를 추론해낼 수 있다. 충전할 때의 power trace를 통해 충전 중 사용자의 기기의 touchscreen에서 특정 번호를 입력하는 경우, 해당 번호들을 인식하고 ..

    [NDSS] WINNIE: Fuzzing Windows Applicationswith Harness Synthesis and Fast Cloning

    https://www.ndss-symposium.org/wp-content/uploads/ndss2021_6A-3_24334_paper.pdf 내용 정리 1. Background 1.1. 현재 상황 `Unix-like`OS 들에 특화 Windows system에서 발생하는 70%의 보안 취약점들은 “memory safety issues” 주로 ‘end-user system’을 사용하기 때문에 더욱 공격자들에게 매력적인 target이 될 수 있다. 1.2. Windows가 Fuzzing에 최적화되지 않은 이유 현재의 Windows Application들은 fuzzing하기에 적합하지 않다. Windows program 또한 memory safety issue에 대해 취약한 점들이 많이 있고, unix sy..

    [USENIX] AFL++: Combining Incremental Steps of Fuzzing Research

    https://www.usenix.org/system/files/woot20-paper-fioraldi.pdf 의 내용 정리 1.1. New Baseline for Fuzzing: AFL++ 1.1.1. Seed Scheduling AFL++에서는 AFLFast를 포함하고, AFLFast에서 제시한 ‘power scheduling’을 확장해 “Seed Scheduling”을 만들었다. 1.1.1.1. Power Scheduling (AFLFast) 총 6개의 CPU 스케줄링 함수를 제시했다. fast (the exponential schedule) coe (cut-off exponential) explore (the exploration-based constant schdule): default sche..

    [USENIX] Breaking Through Binaries: Compiler-quality Instrumentationfor Better Binary-only Fuzzing

    https://www.usenix.org/system/files/sec21fall-nagy.pdf 의 내용 정리 1.1. Fuzzing 1.1.1. What is Fuzzing? Fuzzing(퍼징)은 bug를 찾아내기 위한 소프트웨어 testing 기법이다. Fuzzing은 다량의 test case들을 만들어내고(generation), 대상 바이너리에 test case들이 어떤 영향을 주는지-특히, bug를 유도하지는 않는지- 관찰하는 것이다. 1.1.2. Fuzzing의 구성 Fuzzer는 자동으로 소프트웨어 취약점을 찾아내도록 디자인되었다. target program과 seed test cases들이 주어진다면 일반적인(표준) fuzzing cycle은 아래와 같다. Instrumentation t..

    [CloudGoat] ecs_efs_attack

    # start $ ./cloudgoat.py ecs_efs_attack $ cd ecs_efs_attack_~ [+] start.txt 새로운 값들을 start.txt에서 제시하고 있다. 느낌상.. 보통 start.txt의 정보들로 시작을 하니까 ssh 연결을 먼저 해봐야할 듯하다. [+] goal Mount the "cg-efs-[CG_ID]" efs and obtain the flag. 약간 CTF 느낌으로 플래그를 찾아야하는 것 같다. # Exploit Scenario - (1) step1. ssh connect (EC2 instance - ruse_box) step2. mount the filesystem # Exploit Scenario - (2) step1. connect to ssh (rus..

    [CloudGoat] codebuild_secrets

    # Start [+] start.txt [+] goal A pair of secret strings stored in a secure RDS database. RDS 데이터베이스에 접근해 숨겨진 문자열을 찾아야한다. # Exploit Scenario - Solo step1. configure $ aws configure --profile Solo instance info. $ aws ec2 describe-instances --profile Solo security group $ aws ec2 describe-security-groups --profile Solo 22번 포트를 통해 SSH 연결을 할 수 있는 것 같아보인다. step3. SSM AWS SSM(System Manager) AWS에 설치된 ..

    [CloudGoat] 6. rce_web_app

    # Start [+] start.txt lara와 mcduck에 대한 키를 확인할 수 있다. [+] goal Find a secret stored in the RDS database. 이번 문제는 문제 속 문제랄까.. 1-(1), 1-(2)와 같은 형태로 되어있다. # Exploit scenario - (1) step1. configure $ aws configure --profile Lara $ aws iam list-user-policies --user-name lara --profile Lara $ aws iam list-attached-user-policies --user-name lara --profile Lara $ aws iam list-roles --profile Lara 현재 사용자에게는..

    [CloudGoat] 5. ec2_ssrf

    # Start [+] start.txt 사용자 solus로 로그인하는 key를 얻을 수 있다. [+] goal Invoke the "cg-lambda-[ CloudGoat ID ]" Lambda function. "cg-lambda-[]"라는 이름의 lambda 함수를 실행시킨다. # Exploit Scenario step1. configure + solus 권한 확인 $ aws configure --profile Solus $ aws sts get-caller-identity --profile Solus 사용자 정보를 간단하게 확인할 수 있다. (간단하지만 핵심 정보!) 특히 사용자의 이름을 제대로 확인할 수 있다 : solus-ec2_ssrf_cgid17q46ckgid $ aws iam list-us..