タグ

Securityとregexに関するshin1x1のブックマーク (4)

  • שקופית 1

    Regular Expression Denial of Service Alex Roichman Chief Architect, Checkmarx Adar Weidman Senior Programmer, Checkmarx Checkmarx Confidential and Proprietary - 2008 • DoS attack • Regex and DoS - ReDoS • Exploiting ReDoS: Why, Where & How • Leveraging ReDoS to Web attacks – Server-side ReDoS – Client-side ReDoS • Preventing ReDoS • Conclusions Agenda Checkmarx Confidential and Proprietary - 2008

  • Outage Postmortem - July 20, 2016

    This account is no longer active. For updates on status, head to https://www.stackstatus.net/ OverviewOn July 20, 2016 we experienced a 34 minute outage starting at 14:44 UTC. It took 10 minutes to identify the cause, 14 minutes to write the code to fix it, and 10 minutes to roll out the fix to a point where Stack Overflow became available again. The direct cause was a malformed post that caused o

  • StackExchangeが攻撃されたReDoSの効果

    (Last Updated On: 2018年8月13日)StackExchangeがReDoS攻撃に遭いサイトがダウンした原因をStackExchangeのブログで紹介していました。 PHPへの影響があるか試してみました。結論を書くと、脆弱な正規表現を使っていて攻撃者が入力をコントロールできる場合、簡単に攻撃できるようです。PCRE、Onigurumaの両方で試してみましたがどちらも脆弱でした。 参考:正規表現でのメールアドレスチェックは見直すべき – ReDoS Onigurumaでは破滅的なReDoSが可能です。以前からメールアドレスのチェックに利用する正規表現には注意喚起していましが、どの程度浸透していたのだろうか? ReDoSとは ReDoSはこのブログでも紹介しています。正規表現のアルゴリズムを利用してDoS攻撃する攻撃です。 参考: 正規表現を使ったDoS – ReDoS R

    StackExchangeが攻撃されたReDoSの効果
  • マッチするはずの正規表現がマッチしない現象 - T.Teradaの日記

    今日は、PHPでよく使用される正規表現エンジンであるPCRE(Perl Compatible Regular Expression)の、余り知られていない(と思う)制約について書きます。 プログラム 題材は下のPHPプログラムです。 <?php header('Content-Type: text/html; charset=latin1'); $url = $_REQUEST['url']; if (preg_match('/^(.*?):/s', $url, $match)) { $scheme = $match[1]; if ($scheme !== 'http' && $scheme !== 'https') { exit; } } echo '<a href="'. htmlspecialchars($url). '">link</a>'; 外部から受け取った「url」パラメータ

    マッチするはずの正規表現がマッチしない現象 - T.Teradaの日記
  • 1