Skip to content

Instantly share code, notes, and snippets.

View OldBigBuddha's full-sized avatar
❤️
ℒℴѵℯ

Shinra Yamakawa OldBigBuddha

❤️
ℒℴѵℯ
View GitHub Profile
@OldBigBuddha
OldBigBuddha / handson.md
Created November 24, 2023 09:37
セキュリティ・ミニキャンプ in 広島 2023 講義資料

nginx の設定ミスによる情報漏洩

このワークショップでは、nginx の alias 機能の設定ミスによって Alias Traversal が発生し、Web サーバー上に存在する一部の情報を窃取できる環境を体験します。今回は host.access.log というファイルををサーバー外から取得することをゴールとします。このファイルは Web サーバーへどのようなアクセスがあったかを記録するためのログファイルで、管理者以外が閲覧できてしまう状態は好ましくありません。

Step1. nginx の Docker コンテナを起動する

以下のコマンドを用いて nginx が含まれる Docker コンテナを起動してください。

$ docker run -d -p 8080:80 --name seccamp-nginx nginx:1.25.3
@OldBigBuddha
OldBigBuddha / constitution.json
Last active September 20, 2022 08:36
構造をなるべく統一させた日本国憲法のJSONデータ及び型
{
"Law": {
"LawNum": "昭和二十一年憲法",
"LawBody": {
"LawTitle": "日本国憲法",
"Preamble": {
"Paragraph": [
{
"ParagraphNum": "",
"ParagraphSentence": {
@OldBigBuddha
OldBigBuddha / civil-procedure.json
Created September 7, 2022 13:19
六法(憲法・民法・民事訴訟法・商法・刑法・刑事訴訟法)の未加工JSONデータ
{
"Law": {
"LawNum": "平成八年法律第百九号",
"LawBody": {
"LawTitle": "民事訴訟法",
"TOC": {
"TOCLabel": "目次",
"TOCPart": [
{
"PartTitle": "第一編 総則",
@OldBigBuddha
OldBigBuddha / readme.new.md
Created February 5, 2022 06:53
OJIの部屋

OJIの部屋へようこそ!

このチャンネルには「OJIの部屋」へ参加していただく前にご一読していただきたい内容がブラックホールなみに凝縮された状態で記載されています。 文章量が1ツイートより多くて申し訳ないのですが、このコミュニティで楽しく過ごしていただくために必要なことばかりが書かれていますので少しだけお時間をください。

OJIの部屋とは?

鯖主であるOJIを中心とした Discord コミュニティです。OJI と何かしらの関わりがたまたまあった、たったそれだけがこのコミュニティを作っています。

OJIの部屋で意識してほしいこと

OldBigBuddha's Portfolio

僕のポートフォリオです。どんな経歴があるかとか、どういう成果物があるかみたいなことをまとめられたらなと思っています。

載せることメモ(すべてを載せる必要はない)

Profile

  • 名前(フルネーム・ハンドルネーム)
  • 山川森羅
@OldBigBuddha
OldBigBuddha / .editorconfig
Last active December 8, 2021 07:42
Config Files for Nodejs Project
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
@OldBigBuddha
OldBigBuddha / sample.js
Last active January 27, 2021 15:44
Nunjucks Custom Tag
// Ref 1: https://mozilla.github.io/nunjucks/api.html#custom-tags
// Ref 2: https://dreamonward.com/2019/12/05/nunjucks-custom-tag/
const nunjucks = require("nunjucks")
const DATA = "# Header 1\n\n{% test %}\nHere is Test Section\n{% endtest %}"
class CustomTag {
constructor() {
this.tags = ["test"]
}
@OldBigBuddha
OldBigBuddha / index.html
Last active December 4, 2020 03:05
HTML Sample
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="HTML Sample">
<meta name="robots" content="noindex,nofollow">
<!-- OGP -->
<meta property="og:url" content="https://dummy.url" />
#include <iostream>
using namespace std;
int collatz(int n) {
if (n == 1) {
cout << endl;
return n;
}
int buf = n;
@OldBigBuddha
OldBigBuddha / clean_tweet.py
Created January 27, 2020 10:39
Tweet を全削除するスクリプト、tweepy 3.6.0 が必要
#ref: https://kurozumi.github.io/tweepy/index.html
import tweepy
consumer_key = <YOUR KEY>
consumer_secret = <YOUR SERCRET>
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
# ref: https://kurozumi.github.io/tweepy/auth_tutorial.html
try: