Skip to content

Instantly share code, notes, and snippets.

View motoyasu-saburi's full-sized avatar

Motoyasu Saburi motoyasu-saburi

View GitHub Profile

Vimのメモ

コマンド 説明
x カーソルしたの文字を削除
gg 最初の行
G 最後の行
* 単語の上でその単語のハイライト検索
:noh no highlight ハイライトを消す
/ 検索可能

セキュリティのメモ

レスポンスメッセージ

  • ステータスライン

例: HTTP/1.1 200 OK

  • ヘッダ
    • Date
    • Server (Apache/2.2.14 Ubuntuとか)
    • Content-Length (ボディのバイト数)
  • Content-Type (MIMEタイプ text/plain, image/gifなど)
コマンド 動作内容
alias コマンドを別名で登録する(変数とか)
unalias aliasで登録した内容を解除する
basename パス名からファイル名を取り出す。フィルタ機能もある
cat ファイルの中身・内容を見る。行番号表示ができるくらい?
chgrp ファイルやディレクトリの所属グループを変更 パーミッションの変更
chmod ファイルやディレクトリのパーミッションの変更 ファイル内全てに適用したり
clear 画面のログをクリア
cp copy バックアップを作ったりディレクトリ全部だったり

XSS関連

セキュリティまとめ

https://gist.github.com/motoyasu-saburi/a05a435d1e0efd0a98ddd66275f7f5fb

iframeによる攻撃手法

  1. 罠サイトのiframe内で脆弱なサイトが表示される
  2. 脆弱なサイトはXSS攻撃により、クッキー値をQuery文字列につけて、情報収集ページに推移する
  3. 情報収集ページは受け取ったクッキー値をメールで攻撃者に送信する
@motoyasu-saburi
motoyasu-saburi / vue-js-xss-cheat-sheet.md
Last active September 5, 2018 02:48
Vue.jsのXSSパターン

v-if, v-show, v-for, v-bind

@click="$event.target.ownerDocument.defaultView.alert(1)"

{{}} (mustache),

<p>{{this.$el.ownerDocument.defaultView.alert(1)}}</p>
@motoyasu-saburi
motoyasu-saburi / security-test-cheat-sheet.md
Last active February 13, 2021 10:04
セキュリティテスト自分用メモ

Security test cheat sheet

check list

  • XSS
  • SQL Injection
  • HTTP Injection
  • Command Injection
  • ディレクトリトラバーサル
  • ファイルアップロード
  • Paramter Manipulation
@motoyasu-saburi
motoyasu-saburi / package.json
Created May 16, 2019 08:13
セキュリティスキャンを行うためのpackage.json 参考:https://no1zy.hatenablog.com/entry/static-analysis-of-javascript-for-bughunters 感謝🙏
{
"name": "scanner",
"version": "1.0.0",
"description": "node scanner toolbox",
"main": "index.js",
"scripts": {
"eslint": "eslint . --fix",
"js-beautify": "js-beautify"
},
"dependencies": {
@motoyasu-saburi
motoyasu-saburi / lack_escape_content-disposition_filename.md
Last active June 6, 2024 08:22
Land Mine named "Content-Disposition > filename"

TL;DR

  • I found 1 browser, 1 language, and 15 vulnerabilities in { Web Framework, HTTP Client library, Email library / Web Service, etc }
  • All the vulnerabilities I found were found from a single perspective (I investigated maybe 50-80 products).
  • The RFC description of the problem (rather confusingly) describes the requirements for this problem, while the WHATWG > HTML Spec is well documented.
  • The problem is clearly targeted at the Content-Disposition fields filename and filename*.
  • This problem affects HTTP Request/Response/Email in different ways.
    • HTTP Request : request tampering (especially with file contents, tainting of other fields, etc.)
    • HTTP Response : Reflect File Download vulnerability
  • Email : Attachment tampering (e.g., extension and filename tampering and potential file content tampering)
@motoyasu-saburi
motoyasu-saburi / github_disclosure_hunter.py
Created April 6, 2023 04:07
FIXME 部分は変更必須。あと、3.9 以上の Python で実行できるはず。 上げ直し
import json
import os
import traceback
from dataclasses import dataclass
from time import sleep
from typing import Any, NoReturn
import requests
################