عنوان مقاله :
استفاده از روش برنامهنويسي پدافندي جهت افزايش امنيت نرمافزار در زبان #C
عنوان فرعي :
Using Defensive Programming Technique to Increase Software Security in C# Language
پديد آورنده :
كشوري سامان
پديد آورندگان :
حسني آهنگر محمدرضا نويسنده , كشوري ساناز نويسنده دانشجوي كارشناسي ارشد نرم افزار، دانشگاه رازي كرمانشاه
كليدواژه :
برنامهنويسي پدافندي , كدنويسي امن , برنامهنويسي #C , Secure Coding , Defense Programing , Software security , امنيت نرمافزار , C# Programing
چكيده فارسي :
با توجه به اهميت امنيت نرمافزارهاي رايانهاي در سازمانهاي نظامي، برنامه نويسان و طراحان اين سيستمها ملزم به رعايت مسايل امنيتي در برنامهنويسي هستند. اين مقاله بر روي مرحله كدنويسي در چرخه توليد نرمافزار تمركز دارد. هدف كدنويسي پدافندي، جلوگيري از بروز حوادث ناشي از كدنويسي نامناسب است. اين حوادث شامل ازكارافتادن برنامه، دسترسي به كد منبع، استفاده بيشازحد از منابع سختافزاري و افزايش زمان نياز جهت بهروزرساني برنامه هستند. در ادامه استفاده از آرگومانهاي نامي در فراخواني تابع معرفي گرديد كه اين عوامل منجر به افزايش خوانايي و درنتيجه كاهش زمان بهروزرساني برنامه ميشود. جهت مديريت خطاهاي حين اجرا، روش شكست سريع استثنا ها و نحوه مديريت مناسب آنها ارايه شده است. اين اقدامات موجب افزايش امنيت برنامه و عدم ازكارافتادن برنامه به دليل كدنويسي نامناسب گرديده و از طرفي موجب افزايش تعداد توابع، كلاسها و درنتيجه افزايش تعداد خط كد ميشود. اين مسيله ممكن است موجب نگراني درباره افزايش زمان اجراي برنامه و هزينه پردازشي شود. اين مقاله به پيادهسازي يك برنامه در دو حالت كدنويسي پدافندي و غيرپدافندي پرداخته است. نتايج نشان مي دهد كه ميانگين عمر نخها در حالت پدافندي 23/8 ثانيه است، درحاليكه اين مقدار براي حالت غيرپدافندي، 80/8 ثانيه بود. از طرفي، ميزان درصد استفاده از پردازنده در حالتهاي پدافندي و غيرپدافندي به ترتيب 32/54% و 70/54%، از طرف ديگر براي هزينه پردازشي كاربر نيز به ترتيب 23/24% و 41/24% بود. اين اعداد حاكي از هزينه پردازشي و زمان اجراي يكسان برنامه در دو حالت پدافندي و غيرپدافندي است.
چكيده لاتين :
Due to the importance of computer software security in military organizations, Programmers and designers of these systems are required to comply with security issues in programming. This article focuses on the coding level in the software development cycle. Defensive goals are to prevent accidents caused by improper coding. These events include software crash, access to source code, excessive use of hardware resources and increasing the required time to update program. Then, using named arguments in the function call is introduced to help increase readability and thus reduce time to update the program. To manage runtime errors, the fail fast method for exceptions and their appropriate management are provided. These actions cause the increased program security and non-crash software for improper coding, and also increase the number of functions and classes, and therefore increase the line number of the code. This issue may be the cause for concern about the increase in the runtime and cost of the process. This paper suggests implementing a program in both defense and non-defense modes. The result shows the average life of thread in defensive mode is 8.23 seconds while the amount for non-defense is 8.80 seconds. On the one hand, the percentages of CPU usage on defense and non-defense modes are 54.32 and 54.70, respectively, and on the other hand, for the processing cost of users are 24.23 and 24.41 percent, respectively. These numbers indicate the same processing cost and runtime of the program in both defense and non-defensive modes.
عنوان نشريه :
پدافند غيرعامل
عنوان نشريه :
پدافند غيرعامل