Skip to content

Instantly share code, notes, and snippets.

View wonda-tea-coffee's full-sized avatar

Rikita Ishikawa wonda-tea-coffee

  • 01:14 (UTC +09:00)
View GitHub Profile
@postmodern
postmodern / rails_rce.rb
Last active July 17, 2023 11:54
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#
@stollcri
stollcri / chrome_HSTS_clear.md
Last active January 4, 2024 05:09
Clear 307 HSTS redirects in Google Chrome

To clear 307 HSTS redirects in Google Chrome (if you experimenting with SSL -- you probably wouldn't want to do this for a site that you do not opperate, since it is there to protect you), go to the following URL and delete the site.

chrome://net-internals/#hsts

require 'rational'
class AugmentedMatrix
def initialize a, b, mod
@matrix = []
@i_size = a.size
@j_size = a[0].size
@junpeitsuji
junpeitsuji / mpqs.rb
Last active May 11, 2018 04:00
複数多項式二次ふるい法(MPQS)
#複数多項式二次ふるい法(MPQS)
# の作りかけ
#
# 参考:
# https://en.wikipedia.org/wiki/Quadratic_sieve#Example_of_basic_sieve
# http://www.cs.t-kougei.ac.jp/nsim/lecture/2008/ws/QS.pdf
# http://www.asahi-net.or.jp/~KC2H-MSM/mathland/math12/math1207.htm
# http://inaz2.hatenablog.com/entry/2016/01/09/032521
# http://d.hatena.ne.jp/lemniscus/20130226/1361874593#special
#
@mccabe615
mccabe615 / AngularTI.md
Last active April 18, 2024 11:37
Angular Template Injection Payloads

1.3.2 and below

{{7*7}}

'a'.constructor.fromCharCode=[].join;
'a'.constructor[0]='\u003ciframe onload=alert(/Backdoored/)\u003e';
@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

Based on excellent write-up from https://www.elttam.com.au/blog/ruby-deserialization/

Doesn't work to use YAML.dump(payload) in the above script. This only produces the following YAML, which is worthless:

--- !ruby/object:Gem::Requirement
requirements:
- - ">="
  - !ruby/object:Gem::Version
 version: '0'
@sasasin
sasasin / github_clone_all_repo.sh
Last active February 2, 2022 04:09
GitHub Organization に存在する全 GitHub repo を git clone するやつ
#!/bin/bash
# GitHub Organization に存在する全 GitHub repo を git clone するやつ
# 自分が Read 以上のアクセス権を持っている GitHub repo に限られる
# 組織名を指定する
GH_ORG=$1
# ページングしてくれないので欲しいだけ全部が収まる数を指定する
GH_LIMIT=$2
# 並列数
XARGS_P=$3
@sasasin
sasasin / github_clone_org_all_repo.sh
Created March 3, 2022 08:32
GitHub Organization に存在する全 GitHub repo を git clone するやつ
#!/bin/bash
# GitHub Organization に存在する全 GitHub repo を git clone するやつ
# 自分が Read 以上のアクセス権を持っている GitHub repo に限られる
# 組織名を指定する
GH_ORG=$1
# ページングしてくれないので欲しいだけ全部が収まる数を指定する
GH_LIMIT=$2
# 並列数
XARGS_P=$3
@azu
azu / README.md
Last active November 2, 2022 08:00
サブドメインをユーザーホスティングサイトに使うときのパターン(Same Origin/Cookie/Public Suffix List)

サブドメインをユーザーホスティングサイトに使うときのパターン

hoge.example.com でユーザが作成したサイトをホスティングして、任意のJavaScriptを実行できる状態にしたいケース。 サブドメインを分けることで、Fetch APIなどはSame Origin Policyを基本にするため、別のサブドメインや example.com に対するリクエストなどはできなくなる。

一方で、CookieはSame Origin Policyではない。 デフォルトでは、hoge.example.com から example.com に対するCookieが設定できる。 これを利用したDoS(Cookie Bomb)やこの挙動を組み合わせた別の脆弱性に利用できる場合がある。