AtCoder Beginner Contest 125 D - Flipping Signs

はじめに 過去問をやっていたらDPを利用する問題と当たった。 atcoder.jp 最近DPはちょっと練習していたが解けなかったので復讐をかねて書き残す。 解法 今回はいわゆる「貰うDP」で解いていく。 DP配列として以下の配列を用意する。 ここで、 を決定する際…

NACTF writeup

はじめに Cryptography Vyom's Soggy Croutons - 50 Loony Tunes - Cryptography 50 Dr. J's Group Test Randomizer: Board Problem #0 - Cryptography 100 Reversible Sneaky Algorithm #0 - 125 Reversible Sneaky Algorithm #1 - 275 General Skills SHCA…

CSAW CTF 2019 Writeup [unagi - Web 200]

おそらくXXE。 こちらの記事を参考にflag.txtを読み込んで表示するxmlを作ってアップロードする。 www.mbsd.jp 文字列として"ENTITY", "SYSTEM", "file"が入っていた場合はWAFにブロックされる。 WAFをバイパスする必要がある。 WAFのバイパスに関しては以下…

id0-rsa.pubのメモ【Håstad's Broadcast Attack】

以下問題文。 A message was encrypted with three different 1024 bit RSA public keys, all of which have the exponent e=3 and different moduli N, resulting in three ciphertexts. Luckily, there is an attack that we can use to recover the messa…

id0-rsa.pubのメモ【Easy Passwords】

はじめに やっていきます。 id0-rsa.pub 問題 Warm up with some easy password cracking $1$abadsalt$0abdVS0D4YnJJ4b7l0RRr1 $1$abadsalt$p394aiqZnKUyrO5Rg9Tf01 $1$abadsalt$cJYsdaTkB9F9L9yH2Qjtd. $1$abadsalt$lFZDGpRdmOwRbu6HWuqjv0 $1$abadsalt$1AI…

AtCoder Beginner Contest 137 C - Green Bin

はじめに 最近競技プログラミングをはじめました。 計算量の考え方やアルゴリズムについて学べ、かつゲーム性があって非常に面白いです。 今回は、以下の問題で色々と学びを得たので記録しておく。(普段から競技プログラミングをしていた人からすると当たり…

Web Cryptography APIの鍵管理について調べてみた

はじめに サンプル Key Strageについて 鍵のエクスポートについて おわりに 参考 はじめに Web Cryptography APIについて気になったので触ってみました。 www.w3.org また、Web Cryptography APIは鍵の生成、インポート、エクスポートができるようなので鍵管…

mod_auth_openidcのOIDCCacheType redisを試す

はじめに 設定 動作確認 おわりに はじめに mod_auth_openidcはキャッシュ先としては以下の中から選ぶことができます (https://github.com/zmartzone/mod_auth_openidc/wiki/Caching) 。 shared memory (default) memcache Redis file storage shared memory…

OAuth2.0 Clientでの各種トークン管理について調べてみた (Web App)

はじめに 動作確認 トークンの管理について ID Token Access Token Refresh Token まとめ はじめに これはポエムです。 mod_auth_openidcの実装からClientでの各種トークンの管理について調べて学びを得ます。 github.com 対象としてmod_auth_openidcを選ん…

【WebAuthn】認証器としてTouch IDが利用されたかどうか判定してみる

はじめに 認証器のモデルの判定 Touch IDの判定 おわりに おまけ はじめに WebAuthnで認証器としてMacBookのTouch IDが利用されたかどうかRPで判定したい気がしていた。 するとGWに手が滑ってMacBook Air (Retina, 13-inch, 2018)を買ってしまい、手持ちのMa…

SECCON Beginners CTF 2019 writeup

はじめに So Tired Party おわりに はじめに yharimaで参加し、11th / 666 placeでした。(自分は実質何もやってない) 今回はbinary強い人とweb強い人がチームにいたのでcryptoに専念してみた。(2問しか解けなかったので死にたい...) 他のメンバーのブログ…

Auth0の設定してみた際のメモ

はじめに 登録 Application おわりに はじめに Auth0を利用してみた際の手順を忘れないようにメモしておきます。 登録 以下のリンク先の無償トライアルから登録して使ってみる。 auth0.com 今回はSign UpせずにGithubのアカウントと連携させてみる。 GitHub…

INS'hAck 2019 writeup

ctf

はじめに gflag - MIC 50 Telegram - MIC 50 Yet Another RSA Challenge - Part 1 - CRY 50 おわりに 参考 はじめに あんまりやってないです。最終417位だったぽい。 gflag - MIC 50 以下の内容のファイルが渡される。 https://gist.github.com/kg0r0/0799da…

【 FIDO Conformance Toolsメモ 】Server-ServerAuthenticatorAttestationResponse-Resp-5 Test server processing "packed" FULL attestation

はじめに P-1~2 F-1~14 参考 はじめに Server-ServerAuthenticatorAttestationResponse-Resp-5 Test server processing "packed" FULL attestationというテスト項目について書きます。 こちらのテスト項目はPacked Attestationの中でもFULL attestationとい…

令和CTF writeup

ctf

最終結果はこんな感じでした。 フラグの例は? (10pt) やるだけ。 bREInWAck (100pt) 以下、問題ファイルの中身。 令和和和和和和和和和和和和和和和和「令和 和和和和令和和和和令和和和和和和和令和和 和和和和令和和平平平平平成」令和和和。令 和和和和…

UUT CTF writeup

はじめに honaというチームで参加してました。 稼働としては、2人で半日くらいでした。最終結果は441チーム中112位だったぽいです。 一応Crypto全完しました。自分が取り組んだ問題について writeupを書きます。 Solve the Crypto (25pt) 以下、問題文。 So…

id0-rsa.pubのメモ【Hello Bitcoin】

以下問題文。 Do you know how bitcoin addresses are constructed? This a number. A big number specifically. If it were a bitcoin secret key, what would its (uncompressed) address be? 9417613792618743863052672548396517564660232418131181494019…

keycloak-webauthn-authenticator 動作確認めも

はじめに 環境構築 keycloak-webauthn-authenticatorのビルド Keycloakのデプロイ Authentication Flowの設定 Registration Flowの設定 Browser Flow (2 Factor Authentication) おわりに はじめに KeycloakでWeb Authenticationを試す際の設定メモです。 ま…

Issue 946993: Touch ID authenticator returns attestedCredentialData in GetAssertion response

はじめに 先日chromiumバグ報告デビューしました。 該当箇所としては、Chromeでnavigator.credentials.get()を呼び出した後にMacBookのTouch IDを認証器として利用した際のAuthenticator Dataです。 こちらは、ChromeからMacBookのTouch IDを利用したWeb Auh…

Pragyan CTF 2019 writeup

Easy RSA 以下の値が渡される。eが大きいのでWiener's Attackができるのではと考える。 n = 413514550275673527863957027545525175432824699510881864021105557583918890022061739148026915990124447164572528944722263717357237476264481036272236727160588…

【 FIDO Conformance Toolsメモ 】Server-ServerPublicKeyCredentialCreationOptions-Req-1 Test server generating ServerPublicKeyCredentialCreationOptionsRequest

はじめに Server-ServerPublicKeyCredentialCreationOptions-Req-1 Test server generating ServerPublicKeyCredentialCreationOptionsRequest P-1 Get ServerPublicKeyCredentialCreationOptionsResponse, and check that: P-2 Request from server ServerP…

STEM CTF: Cyber Challenge 2019 writeup

はじめに 以前延期になったCTFが開催されていたのでやってみた。 In Plain Text Binary RE - 50 points 以下問題文。 Starring: Mary McCormack, Fred Weller, Nichole Hiltz, Todd Williams, Lesley Ann Warren, Paul Ben-Victor, Cristián de la Fuente, R…

【 FIDO Conformance Toolsメモ 】イントロダクション

はじめに FIDO Conformance Toolsの取得 テスト項目 PublicKeyCredentialsCreation GetAssertion MDS FIDO Conformance Toolについて 利用イメージ 動作イメージ 確認推奨事項 FIDO Conformance Toolsがリクエストを送信するエンドポイントが用意されている…

InterKosenCTF writeup

はじめに cryptoは全部解くぞ!!という気持ちで始めたがOh my Hashで撃沈した。ついでに裏で開催されていたInsomni'hack Teaser 2019 CTF も撃沈した。 [Forensics 50pts]attack log 以下問題文。 Someone seems to have tried breaking through our authenti…

CTFで使うWebツールまとめ(個人用)

ctf

はじめに 自分用のCTFで使うWebツールのリンク集です。 忘れたやつとか結構あるので適宜追加していく予定です。 crypto http://factordb.com/ https://planetcalc.com/3324/ https://www.rot13.com/ http://www.decode.org/ https://jwt.io/ https://cryptii…

go-ethereum環境構築&動作確認めも

はじめに 動作環境用意 環境 Gethのインストール(Ubuntu) 動作確認手順 プライベート・ネットワークに接続 Genesisファイルの作成 Gethをプライベート・ネットで起動 genesisブロックの初期化 gethの起動 etherの採掘 アカウントの作成 Etherbase etherの…

WebAuthnライブラリ調査めも(PyWebAuthn)

WebAuthnライブラリ調査めも(PyWebAuthn) はじめに 検証環境 クラス WebAuthnMakeCredentialOptions IN OUT WebAuthnAssertionOptions IN WebAuthnUser IN OUT WebAuthnRegistrationResponse IN WebAuthnRegistrationResponse.verify() OUT WebAuthnAssert…

X-MAS CTF 2018 供養(crypto)

X-MAS CTF 2018の復習をします。crypto全然解けなかったので自分への戒めも込めて別枠で復習。 Hanukkah 以下問題文。 Most of the old religions celebrate Christmas in one way or another! hannukah.zip とりあえずzipを展開すると、Hanukkah.py、pubkey…

X-MAS CTF 2018 供養(Webとか)

X-MAS CTFでチラ見以上したけど解けなかった問題の復習をする。(スコアサーバーが動いているうちに、、、) これはその際のメモとお気持ち。cryptoはまた別でやります。 Santa's lucky number(Web) 以下問題文。 Come on! Santa's lucky number is pretty…

X-MAS CTF 2018 writeup

ctf

仕事終わりとかにチマチマやっていました。 cryptoを一問も解けていないので哀しみ。あとで復習します。 そこそこ復習しました。 反省会会場はこちら。 X-MAS CTF 2018 ふくしゅう - 生き恥 X-MAS CTF 2018 ふくしゅう(crypto) - 生き恥 Santa The Weaver…