BSides San Francisco CTF

BSides San Francisco CTF writeup Skipper

Skipper

75 ×

The given binary will give you the password... if you meet its criteria!



objdumpコマンドで逆アセンブルします。
$ objdump -s -D skipper-64
まず、下記の部分でComputer nameの文字列が一致するかチェックしています。
402711: bf 87 29 40 00       mov    $0x402987,%edi #Computer name: %s
402716: b8 00 00 00 00       mov    $0x0,%eax
40271b: e8 c0 e1 ff ff       callq  4008e0 <printf@plt>
402720: 48 8d 85 f0 fb ff ff lea    -0x410(%rbp),%rax
402727: be 9a 29 40 00       mov    $0x40299a,%esi #hax0rz!~
40272c: 48 89 c7             mov    %rax,%rdi
40272f: e8 fc e1 ff ff       callq  400930 <strcmp@plt>
402734: 85 c0                 test   %eax,%eax
402736: 74 23                 je     40275b <__ctype_b_loc@plt+0x1dab>
次に下記の部分でOS versionの文字列が一致するかチェックしています。
402774: bf dc 29 40 00       mov    $0x4029dc,%edi #OS version: %s
402779: b8 00 00 00 00       mov    $0x0,%eax
40277e: e8 5d e1 ff ff       callq  4008e0 <printf@plt>
402783: 48 8d 85 f0 fb ff ff lea    -0x410(%rbp),%rax
40278a: be ec 29 40 00       mov    $0x4029ec,%esi #2.4.31
40278f: 48 89 c7             mov    %rax,%rdi
402792: e8 99 e1 ff ff       callq  400930 <strcmp@plt>
402797: 85 c0                 test   %eax,%eax
402799: 74 48                 je     4027e3 <__ctype_b_loc@plt+0x1e33>
次に下記の部分でCPUIDがAMDisbetter!と一致するかチェックしています。
402808: be 29 2a 40 00       mov    $0x402a29,%esi #AMDisbetter!
40280d: 48 89 c7             mov    %rax,%rdi
402810: e8 1b e1 ff ff       callq  400930 <strcmp@plt>
402815: 85 c0                 test   %eax,%eax
402817: 74 24                 je     40283d <__ctype_b_loc@plt+0x1e8d>
コンピュータ名、OSバージョン、CPUIDすべて一致しませんので、バイナリエディタで下記の74(je)の命令コードを75(jne)に書き換えることで、処理が流れるようにします。
402736: 74 23                 je     40275b <__ctype_b_loc@plt+0x1dab>
(略)
402799: 74 48                 je     4027e3 <__ctype_b_loc@plt+0x1e33>
(略)
402817: 74 24                 je     40283d <__ctype_b_loc@plt+0x1e8d>
命令コードを書き換えた実行ファイルを実行すると、下記のとおりフラグが表示されました。
$ ./skipper-64-2
Computer name: ubuntu14-VirtualBox
OS version: 3.13.0
GenuineIntel
Result: FLAG:f51579e9ca38ba87d71539a9992887ff
フラグは、
FLAG:f51579e9ca38ba87d71539a9992887ff
です。
 


BSides San Francisco CTF writeup Quote

Quote

1 ×

This movie featured the memorable phrase "My voice is my passport".


This movie featured the memorable phrase "My voice is my passport".で検索します。

フラグは、
Sneakers
です。
 
 
スニーカーズ [Blu-ray]
ロバート・レッドフォード/ダン・エイクロイド/ベン・キングズレー/メアリー・マクドネル/リバー・フェニックス/シドニー・ポワチエ/デビッド・ストラザーン
ジェネオン・ユニバーサル
2013-06-26

BSides San Francisco CTF writeup NOP

NOP

20 ×

x86's NOP is actually another instruction. What is the Intel syntax representation of the assembly of the other instruction?

Include a space between operands, if applicable.



http://www.mztn.org/lxasm64/amd07_mov.html#xchg

フラグは、
XCHG EAX, EAX
です。
 
デバッガによるx86プログラム解析入門【x64対応版】
Digital Travesia管理人 うさぴょん
秀和システム
2014-10-22

 

BSides San Francisco CTF writeup Let's play a game

Let's play a game

1 ×

This is the name of the game that a young hacker thinks he's playing with the WOPR Supercomputer. [Spaces expected]



https://en.wikipedia.org/wiki/WarGames#Video_games

フラグは、
Global Thermonuclear War
です。

 
WarGames: WOPR
Be-Rad Entertainment
2013-03-04

BSides San Francisco CTF writeup Hackers

Hackers

1 ×

Hack the __!



これかな?
https://en.wikipedia.org/wiki/Hackers_(film)


フラグは、
planet
です。

サイバーネット [DVD]
ジョニー・リー・ミラー
20世紀 フォックス ホーム エンターテイメント
2004-05-28


 

BSides San Francisco CTF writeup easycap

easycap

40 ×

Can you get the flag from the packet capture?


ダウンロードしたpcapファイルをWiresharkで開きます。メニューから、[分析]-[追跡]-[TCPストリーム]を選択します。下図のとおりフラグが表示されます。

1

フラグは、
FLAG:385b87afc8671dee07550290d16a8071
です。


 

BSides San Francisco CTF writeup easyauth


easyauth

30 ×

Can you gain admin access to this site?

http://easyauth-afee0e67.ctf.bsidessf.net



easyauth.phpを確認すると、cookieのusernameがadministratorであればフラグが表示されることが分かります。
  $cookie = $_COOKIE['auth'];

  $pairs = explode('&', $cookie);
  $args = array();
  foreach($pairs as $pair) {
    if(!strpos($pair, '='))
      continue;

    list($name, $value) = explode('=', $pair, 2);
    $args[$name] = $value;
  }
  $username = $args['username'];

  print "<h1>Welcome back, $username!</h1>\n";
  if($username == 'administrator') {
    print "<p>Congratulations, you're the administrator! Here's your reward:</p>\n";
    print "<p>" . FLAG . "</p>\n";
それでは、問題で与えられたURLにアクセスします。

1

guest/guestでログインします。

2

ここでcookieの値を確認します。下記のとおりusernameがguestと成っています。
username=guest&date=2017-02-13T15:33:15+0000&
username=guestの部分をusername=administratorに書き換えて、Click hereのリンクをクリックします。下図のとおりフラグが表示されました。

3

フラグは、
FLAG:0076ecde2daae415d7e5ccc7db909e7e
です。



BSides San Francisco CTF writeup Easy

Easy

10 ×

This one is easy.


stringsコマンドでダウンロードしたLinux用実行ファイルに含まれる文字列を確認します。
$ strings easy-32
(略)
What is the password?
the password
FLAG:db2f62a36a018bce28e46d976e3f9864
Wrong!!
(略)
フラグは、
FLAG:db2f62a36a018bce28e46d976e3f9864
です。



BSides San Francisco CTF writeup Ancient Hop Grain Juice

Ancient Hop Grain Juice

1 ×

This beverage, brewed since ancient times, is made from hops and grains?


Ancient Hop Grain Juiceでググります。

フラグは、
Beer
です。

 
藤原ヒロユキのBEER HANDBOOK
藤原ヒロユキ
ステレオサウンド
2015-06-10

記事検索
ギャラリー
  • TetCTF 2023 NewYearBot
  • UUT CTF writeup Find The Password
  • UUT CTF writeup The Puzzle
  • Hack Zone Tunisia 2019 writeup Microscope
  • Hack Zone Tunisia 2019 writeup Welcome
  • SwampCTF 2019 writeup Brokerboard
  • SwampCTF 2019 writeup Leap of Faith
  • SwampCTF 2019 writeup Last Transmission
  • CBM CTF 2019 writeup Long road
カテゴリー