일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- 국가정보원
- 웹 해킹 입문
- 여행
- Service
- HTML
- 기타정보
- nurisec
- Los
- 연구모임
- PHP
- 국가기록원
- 국정원
- 대외활동
- 12기
- 경기팀
- suninatas
- 파이썬
- 불법유통
- codeup
- 정보보안
- UKPT level
- 프로젝트
- MITRE ATT&CK
- 도구모음
- UKPT
- 화학물질불법유통온라인감시단
- 화학물질
- 화학물질안전원
- webhacking
- 불법유통근절
- Today
- Total
목록2024/11 (28)
agencies
각 로그인 사용자마다, 홈 디렉토리 적용! sbom 생성시마다 try 폴더(숫자폴더)가 생성됨 sbom 새로 정의해주고!%%writefile sbom.pyimport sysimport osimport uuidimport zipfileimport timeimport csvimport jsonimport subprocessimport pandas as pdimport hashlibimport shutil# GraphState 클래스class GraphState: def __init__(self): self.state = { "file_path": "", "output_path": "", "total_time": 0, ..
가끔씩 파일탐색기를 실행하면이렇게 응답이 없는 경우가 발생하는데, 이는 보통 윈도우 업데이트가 진행되고 있어서 그렇습니다. 확인을 위해 설정에서 업데이트를 봤습니다. (업데이트가 진행되는 모습을 보고 중단시켰습니다) 결론은!이 현상이 발생하면 그냥 컴퓨터를 재부팅하면 됩니다.
지난 시간에 이어서 colab 환경에서 웹 사이트를 구축하고자 한다. 기본 설치 명령어!pip install flask flask-ngrok#mobsy mobsy!2345 (ngrok)!wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-stable-linux-amd64.zip!unzip ngrok-stable-linux-amd64.zip!./ngrok authtoken 2pVOYm4ltw1s3uz2KSwrWdmncyw_82kt3McUqdiyV8WLRZQn5!mkdir templates!mkdir static!mkdir instance!mkdir uploads!mkdir output!pip install flask flask-mysql flask-login!pip in..
1. 우선 ngrok 사이트에서 회원가입을 진행해야 합니다. (토큰)https://ngrok.com/ ngrok | API Gateway, IoT Device Gateway, Secure Tunnels for Containers, Apps & APIsngrok is a secure ingress platform that enables developers to add global server load balancing, reverse proxy, firewall, API gateway and Kubernetes Ingress to applications and APIs.ngrok.com> 여기서 회원가입을 진행합니다.그럼 dashboard에서 (Your Authtoken 을 눌러서 확인합니다) ※ 코랩에서..
이번시간에는backward slicing 으로 실제 취약한 함수의 흐름을 파악할 수 있도록 joern을 이용한 흐름 추적을 통해나온 결과물을 추상화 하고 전체 소스코드를 추상화 한 것과 비교를 해보고자 합니다.import subprocessimport jsonimport hashlibimport csvfrom pycparser import c_parser, c_astimport reimport os# Joern 파일 경로 및 함수 이름file_name = "/content/connect.c"func_name = "stl_remove_degenerate"csv_file_name = "/content/backward-db.csv"class Abstractor(c_ast.NodeVisitor): def ..
변수 : var파라미터 : param 으로 추상화 진행 소스코드from pycparser import c_parser, c_astimport redef remove_preprocessor_directives(code): """ C 코드에서 주석 및 전처리 지시문 제거 """ # 주석 제거 code = re.sub(r'//.*?\n|/\*.*?\*/', '', code, flags=re.S) # 전처리 지시문 제거 code = "\n".join([line for line in code.splitlines() if not line.strip().startswith("#")]) return codeclass Abstractor(c_ast.NodeVisitor): ..
tesseract 를 이용하여 이미지 안의 텍스트를 읽을 수 있다고 합니다.(소스코드)#pip install pytesseractimport pytesseractfrom PIL import Image# Tesseract 실행 파일 경로 설정 (Windows 설치 경로)pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"# 이미지 로드image_path = "./image.png"image = Image.open(image_path)# 이미지에서 텍스트 추출text = pytesseract.image_to_string(image)print(text) (테스트 이미지) (실행결과) 사전 준비물환경 : 윈도..
colab joern 설치 과정!sudo apt install openjdk-21-jdk -y!wget https://github.com/joernio/joern/releases/latest/download/joern-install.sh!chmod +x joern-install.sh!./joern-install.sh!unzip joern-cli.zip backward slicing 여기서는 대상 파일이 test.c취약한 함수가 func_3 으로 가정 import subprocess# 파일명과 취약한 함수명을 변수로 정의file_name = "/content/test.c"func_name = "func_3"# Joern 스크립트 생성joern_script_content = f"""importCode("{..
# Load and read the provided files to analyze the contentpatch_file_path = "test.patch"old_vul_file_path = "test_OLD.vul"with open(patch_file_path, 'r') as patch_file: patch_content = patch_file.readlines()with open(old_vul_file_path, 'r') as old_vul_file: old_vul_content = old_vul_file.readlines()# Extract removed lines (starting with '-') from the patch fileremoved_lines = [line[1:].stri..
import pandas as pdimport osimport reimport requestsfrom bs4 import BeautifulSoup# 초기 설정csv_file_path = "output.csv"columns = [ "index", "all_file_name", "CVE-ID", "Description", "Affected_Product", "Affected_Version", "Vulnerability_Type", "Severity", "CVSS_Score", "Attack_Vector", "Impact-C", "Impact-I", "Impact-A", "Exploitability", "Published_Date", "Last_Modified_Date", "Privile..
msg = "in the flag.txt"key = "?????"flag = []for i in range(len(msg)): t = ord(msg[i]) ^ ord(key[i%len(key)]) flag.append(chr(t))with open("flag.txt","w") as f: f.write("".join(flag)) 이것은 문제 파일입니다.msg 에는 flag.txt파일 안에 있는 문자를 읽어옵니다.key에는 xor할 문자 5개가 들어갑니다. 플래그는 mobsy{ 로 시작하기 때문에xor을 진행할 때 범위를 30 ~ 130 으로 진행합니다 : 키 값이 하나일 경우만... 진행key를 mobsy로 설정하고 xor을 시도해봅시다. with open("flag.txt","r") a..