表題の件ですが、現在CakePHP3でアプリケーションの開発を行なっています。
作成した機能について、セキュリティ診断ツールとしてOWASP ZAPを使用しています。
その際、以下のようなエラーが発生しており、対処法について困っております。
Medium | 書式文字列エラー |
---|---|
Description | A Format String error occurs when the submitted data of an input string is evaluated as a command by the application. |
URL | http://xxx.xxx.xxx.xxx/aplication/hoge |
Method | POST |
Parameter | _method |
Attack | ZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n |
・・ | ・・・ |
Instances | 25 |
Solution | Rewrite the background program using proper deletion of bad character strings. This will require a recompile of the background executable. |
Other information | Potential Format String Error. The script closed the connection on a microsoft format string error |
書式文字列エラーについて、攻撃に使用されたパラメータを実際にコードに組み込んで動作を確認したところ、
攻撃による不正な動作はなく、DB登録の時に型が合わないなどで例外を投げて終了されます。
- このような現状で、CakePHP3を用いたプログラムでは
「%1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n」のような入力値に対して、しっかりと対応されていると言って良いのでしょうか?
-
また対応されているならば、OWASPでエラーが生じる原因は何か?
-
対応されているとは言えない場合は、どのようにプログラムを修正すれば良いか?
どなたかお詳しい方がいらっしゃいましたら、これらに回答していただけないでしょうか?
どうぞよろしくお願いいたします。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/24 00:51 編集
2017/05/24 04:05
2017/05/24 07:29