분류 전체보기 23

[Cheat Sheet] Powershell 흔적

ConsoleHost_history.txt 해당 로그 확인 시, 해당 유저가 사용한 Powershell 명령어 로그를 확인할 수 있다. Powershell 명령어로도 확인 가능 (Get-History) 경로 %USER_PROFILES%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt Event 로그 로컬 Powershell 실행 Windows PowerShell.evtx EID 400 : 로컬이든 원격이든 PowerShell 활동 시작 EID 403 : PowerShell 활동 완료 EID 600 : WSMan과 같은 provider가 시스템에서 Powershell 활동 수행 Microsoft-Windows-P..

Python으로 zip 파일 만들기 (zipfile, pyminizip)

Python zip 관련 모듈 zipfile pyminizip (사용) zipfile 단점 zipfile 모듈에는 하나의 단점이 있는데, Password 설정을 못한다 🤣 사용 from zipfile import ZipFile, ZIP_DEFLATED def compress(): with ZipFile('compress_your_file.zip', 'w', allowZip64=True) as zipper: for (path, dir, files) in os.walk('compress_your_path'): for file in files: # write zipper.write(os.path.join(path, file), compress_type=ZIP_DEFLATED) zipper.close() ret..

[web-server] Python - Blind SSTI Filters Bypass

시작 전 테스트 name, surname, email birth date에 아무값 넣으면 "Thank you! Your application will be reviewed within a week."라는 문구 확인 가능 웹 사이트 밑에 자신의 웹사이트는 오픈소스라 하여 다운 받으라고 한다. 해당 파일(cms.tar.gz)을 다운받으면 server_ch73.py 파일을 확인할 수 있다. Our website's framework is now open source! You can download it 오픈 소스 파일 분석 해당 파일은 Flask가 필요해서 pip install 한다. pip install flask --user 입력한 값이 jinja2 Template render 를 호출하는 것을 확인할 수..

wargame/root-me.org 2022.03.04

[Vue.js] Vue.js Navigation Guard (beforeEach)

Vue.js Router Life cycle Navigation Guard 'beforeEach' Vue.js Router의 Navigation Guard 중 하나인 'beforeEach'는 Global Guard라고도 불린다. 사용은 아래와 같다. router.beforeEach((to, from, next) => {}) to: 이동할 URL 정보가 담긴 라우터 객체 (이동할 URL) from: 현재 URL 정보가 담긴 라우터 객체 (현재 URL) next: to에서 지정한 URL로 이동하기 위해 필수적으로 호출해야하는 함수 beforeEach(to, from, next)의 to.matched to.matched는 return 값이 LIST이다. router.js에서 routes의 path 중 일치하는..

LNK 파일

링크파일 (.lnk) LNK 파일은 흔히 링크 파일이라고 부른다. 윈도우 운영체제에서 바로가기를 생성하는데 사용된다. 링크 파일 포맷 ShellLinkHeader (default) 기본적인 헤더로 식별 정보, 시간 정보, 대상 파일 크기, 대상 파일 특성 등의 정보가 저장된다. LinkTargetIDList (optional) ShellLinkHeader의 HasLinkTargetIDList 플래그가 설정되어 있을 때만 존재하는 구조 링크된 대상의 다양한 정보를 리스트 형태로 구성해 놓은 구조 LinkInfo (optional) ShellLinkHeader의 HasLinkInfo 플래그가 설정되어 있을때만 존재하는 구조 링크 대상을 참조하기 위한 정보를 가진 구조이다. StringData (optiona..

Digital Forensic 2017.04.22

[libtins] Basics을 공부하면서

libtins 를 사용하면 PDU라는 class를 볼 수 있는 데 처음에 이해 안 되는 것도 예제로 보니 이해가 되는 것 같다. #include using namespace Tins; int main() { EthernetII eth; IP *ip = new IP(); TCP *tcp = new TCP(); // tcp is ip's inner pdu ip->inner_pdu(tcp); // ip is eth's inner pdu eth.inner_pdu(ip); } EthernetII | IP | TCP 이 구조가 완성되는 느낌인 것 같다... 다음으로 Address Class를 소개한다.Address Class에는 IPv4Address, IPv6Address, HWAddress 등이 있다. 마지막으로..

[libtins] libtins 라이브러리에 대해...

BoB 에서 교육을 받으면서 gilgil 멘토님에 소개로 알게된 라이브러리이다. 라이브러리http://libtins.github.io/ githubhttps://github.com/mfontanini/libtins 설치 방법은 github에 README.md에 상세하게 나와있다. 예제 소스 #include #include using namespace Tins; bool callback(const PDU &pdu) { const IP &ip = pdu.rfind_pdu(); // Find the IP layer const TCP &tcp = pdu.rfind_pdu(); // Find the TCP layer std::cout