Similar documents
Condition DAQ condition condition 2 3 XML key value

file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose

PowerGres on Linuxマニュアル


第5回お試しアカウント付き並列プログラミング講習会

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

fx-9860G Manager PLUS_J

Web Web Web Web Web, i

1.ppt

Original : Hello World! (0x0xbfab85e0) Copy : Hello World! (0x0x804a050) fgets mstrcpy malloc mstrcpy (main ) mstrcpy malloc free fgets stream 1 ( \n

1 $ cat aboutipa 2 IPA is a Japanese quasi-government 3 organization established in accor- 4 dance with The Law for Information 5 Processing Technolog

2 2.1 NPCMJ ( (Santorini, 2010) (NPCMJ, 2016) (1) (, 2016) (1) (2) (1) ( (IP-MAT (CONJ ) (PP (NP (D ) (N )) (P )) (NP-SBJ *

橡SPA2000.PDF

評論・社会科学 84号(よこ)(P)/3.金子

新・明解C言語 実践編

C

ex01.dvi

昨年度までの研究紹介 および 研究計画

PowerGres on Linuxマニュアル

超初心者用

生研ニュースNo.132

slide5.pptx

HP OpenSource ブループリント

double float

新版明解C言語 実践編

XML Tool to Check the Consistency both Software Documents Using XML and Source Programs 1 Summary. Generally, a software consists of source programs a

スライド 1

-like BCCWJ CD-ROM CiNii NII BCCWJ BCCWJ

CONTENTS Public relations brochure of Higashikawa September No.755 2

インストール取扱説明書

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch

ex14.dvi

,,,,., C Java,,.,,.,., ,,.,, i

\615L\625\761\621\745\615\750\617\743\623\6075\614\616\615\606.PS

ex01.dvi

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

29 jjencode JavaScript

3_23.dvi

Microsoft Word - Win-Outlook.docx

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

〈論文〉興行データベースから「古典芸能」の定義を考える

卒 業 研 究 報 告.PDF

PDCA

橡sit nakai-ppt


PostgreSQLによる データベースサーバ構築技法

Web apache

programmingII2019-v01


大統一Debian勉強会 gdb+python拡張を使ったデバッグ手法

SMTP FP Mail MX /

Compiled MODELSでのDFT位相検出装置のモデル化と評価

Microsoft Word - C.....u.K...doc

.N..


untitled

untitled

25 Removal of the fricative sounds that occur in the electronic stethoscope

untitled

20 H8/3069LAN H. Fukura

16_.....E...._.I.v2006

OpenCV IS Report No Report Medical Information System Labratry

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2


NO

Web Web ( (SOAP (SOAP/http (WSDL UDDI 1. 2.XML 3. (XDoS http, https SOAP XML Web/App ( App

スライド タイトルなし

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

CONTENTS Public relations brochure of Higashikawa March No.749 2

Nippon Suisan Gakkaishi 64(4), (1998) Biodegradation of Raw Silk in Seawater Akihiko Nakayama,*1,*3 Yoshihiro Inoue,*2 Yozo Tahara,*2,*4 Shozo

G

Systemwalker IT Service Management Systemwalker IT Service Management V11.0L10 IT Service Management - Centric Manager Windows

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

122.pdf

特集_02-03.Q3C

yacc.dvi

Taro-ファイル処理(公開版).jtd

C. S2 X D. E.. (1) X S1 10 S2 X+S1 3 X+S S1S2 X+S1+S2 X S1 X+S S X+S2 X A. S1 2 a. b. c. d. e. 2

<30375F97E996D88E812E696E6464>


VQT3B86-4 DMP-HV200 DMP-HV150 μ μ l μ

IPSJ SIG Technical Report Vol.2017-ARC-225 No.12 Vol.2017-SLDM-179 No.12 Vol.2017-EMB-44 No /3/9 1 1 RTOS DefensiveZone DefensiveZone MPU RTOS


1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

奈良大学紀要 46号(よこ)☆/5.横田

joho07-1.ppt

橡Ⅳインストールマニュアル.PDF

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

Ver.1 1/17/2003 2

Microsoft Word - PCM TL-Ed.4.4(特定電気用品適合性検査申込のご案内)


MEET 270

国際恋愛で避けるべき7つの失敗と解決策

A Nutritional Study of Anemia in Pregnancy Hematologic Characteristics in Pregnancy (Part 1) Keizo Shiraki, Fumiko Hisaoka Department of Nutrition, Sc


FA




Transcription:

1.... 1 2.... 1 2.1. RATS... 1 2.1.1. expat... 1 2.1.2. expat... 1 2.1.3. expat... 2 2.2. RATS... 2 2.2.1. RATS... 2 2.2.2.... 3 3. RATS... 4 3.1.... 4 3.2.... 4 3.3.... 6 3.3.1.... 6 3.3.2.... 6 3.3.3.... 8 3.3.4.... 8 3.3.5.... 8 3.3.6.... 9 3.4.... 9 4....11 5.... 15 5.1. RATS... 15 -i

1. RATS Rough Auditing Tool for Security GPL 1 RATS C C++ Perl PHP Python C UNIX RATS 2.1 2. RATS XML expat expat expat RATS expat 2.1.1. expat expat James Clark MIT/X Consortium expat C XML RATS XML RATS expat XML 2.1.2. expat expat http://prdownloads.sourceforge.net/expat/expat-1.95.6.tar.gz?download 1 GNU Gneral Public Licence Version2 GPL2-1

1.95.6 RPM Red Hat Linux RPM http://prdownloads.sourceforge.net/expat/expat-1.95.6-1.i386.rpm?download 2.1.3. expat expat /usr/local 1.95.6 expat Red Hat Linux 7.2 %./configure % make % make install %./configure --prefix= % make % make install RATS expat expat RATS RATS 2.2.1. RATS RATS http://www.securesoftware.com/download_form_rats.htm RATS E-mail - 2

GPL win32 win32 2.2.2. Red Hat Linux 7.2 %./configure % make % make install RATS /usr/local/bin /usr/local/share %./configure --prefix= % make % make install RATS %./configure --bindir=rats --datadir=db % make % make install RATS README /usr/local/lib /usr/local/share expat /usr/local/lib /usr/local/include expat --with-expat-lib --with-expat-include configure - 3

%./configure --with-expat-lib= --with-expat-include= % make % make install 3. RATS RATS % rats RATS.c.cpp.pl.php.py % rats -R RATS - 4

% rats --noheader % rats --nofooter % rats --quiet % rats --resultonly RATS XML HTML XML % rats --xml HTML % rats --html HTML Web - 5

3.3.1. -a./src random gets % rats -a random -a gets 3.3.2. -a - 6

strcpy(buf, dst); /*rats: ignore*/ C++ strcpy(buf, dst); //rats: ignore strcpy 2 strcpy C++ strcpy(buf1, dat1); /*rats:ignore*/ strcpy(buf2, dat2); C++ /* rats:ignore */ strcpy(buf, dst); rats:ignore ignore rats: its4: ITS4 RATS ITS4 RATS Flawfinder Flawfinder RATS ITS4 RATS Flawfinder - 7

3.3.3. RATS -l --language.c foo.c perl % rats -l perl foo.c 3.3.4. RATS % rats -h -h --help 3.3.5. 3 High Medium Low 1 2 3 1 High 2 High Medium 3 -w % rats -w 2 2-8

3.3.6. -d -db --database /usr/share original_1.db original_2.db % rats -d /usr/share/orginal_1.db -d /usr/share/original_2.db -x % rats -x -d /usr/share/orginal_1.db -d /usr/share/original_2.db RATS XML 2 XML DOCTYPE <?xml version="1.0"?> <!DOCTYPE RATS []> - 9

C RATS C <VulnDB lang="c"> 2 <Vulnerability> </Vulnerability> <Name> </Name> <Severity> </Severity> <Info> </Info> <Description> </Description> <Arg> </Arg>, <FormatArg> </FormatArg>, <SrcBufArg> </SrcBufArg> URL <URL> </URL> <RaceCheck> </RaceCheck>, <RaceUse> </RaceUse>, <InputProblem> </InputProblem>, <FSProblem> </FSProblem>, <BOProblem> </BOProblem> <Vulnerability> <Name> </Name> <info> <Description> </Description> <Severity> High Low Medium </Severity> </info> </Vulnerability> RATS - 10

4. fopen #include <stdio.h> int main(int argc, char *argv[]){ char *fmt = "%d:%s n"; int i=1; FILE *fp; } if(argc = = 3){ fp = fopen(argv[1], "w"); fprintf(fp, fmt, i, argv[2]); fclose(fp); } return 0; test.c % rats test.c Entries in perl database: 33 Entries in python database: 62 Entries in c database: 334 Entries in php database: 55 Analyzing test.c test.c:9: High: fprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Total lines analyzed: 14 Total time 0.000293 seconds 47781 lines per second fprintf High fopen RATS Low -w - 11

% rats -w3 test.c Entries in perl database: 33 Entries in python database: 62 Entries in c database: 334 Entries in php database: 55 Analyzing test.c test.c:9: High: fprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. test.c:8: Low: fopen A potential race condition vulnerability exists here. Normally a call to this function is vulnerable only when a match check precedes it. No check was detected, however one could still exist that could not be detected. Total lines analyzed: 14 Total time 0.000285 seconds 49122 lines per second fopen Low fprintf High % rats --resultsonly -w3 test.c test.c:9: High: fprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. test.c:8: Low: fopen A potential race condition vulnerability exists here. Normally a call to this function is vulnerable only when a match check precedes it. No check was detected, however one could still exist that could not be detected. 6 fopen HTML HTML test.html - 12

% rats --html --resultsonly -w3 test.c > test.html Web Microsoft Internet Expolorer 6.0 XML % rats --xml --resultsonly -w3 test.c - 13

Web 2 2 XML Web Web XML - 14

5. -a <fun> fun read_line_from_socket read_line_from_user > rats a read_line_from_socket a read_line_from_user./*.c -d -db -d --database -h --help -l --language C perl > rats l perl./*.c -w 1 2 3 --warinig High, Medium, Low 1 High 2 High Medium 3 -w 2 -x -R --no-recursion --xml XML --html HTML --noheader --nofooter --quiet --resultsonly --columns --context - 15

[1] Secure Software, http://www.securesoftware.com/download_form_rats.htm - 16