SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Software Walkthrough and
Screening
Capability Building for Cyber Defense
Dr. Fahim Arif
(PhD in Software Engineering)
Director R&D
Senior Member IEEE
MCS (NUST)
The life of a cyber threat
Let us what is a cyber threat
Premise
• Today’s need – modern equipment/ gadgets
• Hardware and software
• Foreign dependency
National Level
• Indigenization ------ desire and need
• Local industry/ R&D ?????????????????????
• Academia
• Manpower/ HR
What to do?
• Screening of Hw and Sw
• Software and code walkthrough
• Back doors
• Channels
• Malwares
• Hidden traps
How to do it?
• Software or Code Walkthroughs
• Code Reviews
• Software Inspections
• Paired Programming
• Alternative Approaches
9
Generally, not
technically
DEFINITION
In software engineering, a walkthrough is a form of software peer
review "in which a designer or programmer leads members of the
development team and other interested parties go through a software
product, and the participants ask questions and make comments about
possible errors, violation of development standards, and other
problems.
[IEEE Std. 1028-1997, IEEE Standard for Software Reviews, clause 3.8]
Software Walkthroughs
Software Walkthroughs
• Methodology
• A walkthrough is an informal way of presenting a technical document
in a meeting.
• An author or coordinator runs the walkthrough: calling the meeting, inviting the
reviewers, soliciting comments and ensuring that everyone present understands
the work product.
• Walkthroughs are used when the author of a work product needs to take into
account the perspective of someone who does not have the technical expertise to
review the document.
• After the meeting, the author should follow up with individual attendees who
may have had additional information or insights. The document should then be
corrected to reflect any issues that were raised.
13
• Verify that everyone is present for this activity. This can include
users, stakeholders, engineering leads, managers and others
• Ensure that everyone present understands the purpose of the
walkthrough and how the material is to be presented.
• Describe each section of the material to be covered by the
walkthrough.
• Present the material in each section, ensure that everyone
present understands the material.
• Lead a discussion to identify any missing sections or material.
• Document all issues that are raised by walkthrough attendees.
14Guidelines for a Successful Walkthrough
• For more information about Walkthroughs:
• http://www.jodypaul.com/SWE/WT/walkthroughs.html#types
15
Software Walkthroughs
Code Review
• A code review is a special kind of inspection in which the team
examines a sample of code and fixes any defects in it.
• In a code review, a defect is a block of code which does not properly
implement its requirements, which does not function as the programmer
intended, or which is not incorrect but could be improved
• For example, it could be made more readable or its performance could be
improved
16
Code Review
• It’s important to review the code which is most likely to have defects. This will
generally be the most complex, tricky or involved code.
• Good candidates for code review include:
• A portion of the software that only one person has the expertise to maintain
• Code that implements a highly abstract or tricky algorithm
• An object, library or API that is particularly difficult to work with
• Code written by someone who is inexperienced or has not written that kind of code
before, or written in an unfamiliar language
• Code which employs a new programming technique
• An area of the code that will be especially catastrophic if there are defects
17
Code Review
• Meetings are not the answer, why? http://vimeo.com/29531712
• Can’t see the new code working.
• Only covers other important code, which can leave mistakes or errors in other code.
• Hard to track changes in larger reviews.
• Using tools allows:
• Gathering changed files over multiple iterations of changes.
• No meetings required the review can be done at any time by any number of
reviewers.
• All conversations, changes, and defects are tracked.
• Requires all participants to verify the code before the review is completed.
18
Code Review 19
Essential elements of
a formal code review
• Identify problems:
• Find problems with the software such as missing items, mistakes, etc.
• Follow rules:
• Amount of code to be reviewed, how much time will be spent, etc.
• Prepare:
• Each participant should prepare in order to contribute to the review.
• Write a report:
• Summarize the results of the review, make report available to the
development team.
Formal code inspections
• Code presenter is not the author of the code.
• The other participants are the inspectors.
• There is a moderator to assure that the rules are followed and the
meeting runs smoothly.
• After the inspection a report is composed. The programmer then
makes changes and a re-inspection occurs, if necessary.
• Formal code inspections are effective at finding bugs in code and
designs and are gaining in popularity.
Pair Programming
• Pair programming is a technique in which two programmers work
simultaneously at a single computer and continuously review each
others’ work.
• Although many programmers were introduced to pair programming
as a part of Extreme Programming, it is a practice that can be
valuable in any development environment.
• Pair programming improves the organization by ensuring that at
least two programmers are able to maintain any piece of the
software.
22
Pair Programming (pros and cons)
• In pair programming, two programmers sit at one computer to write code.
Generally, one programmer will take control and write code, while the other
watches and advises.
• Some teams have found that pair programming works best for them if the pairs are
constantly rotated; this helps diffuse the shared knowledge throughout the organization.
Others prefer to pair a more junior person with a more senior for knowledge sharing.
• The project manager should not try to force pair programming on the team; it helps
to introduce the change slowly, and where it will meet the least resistance.
• It is difficult to implement pair programming in an organization where the programmers
do not share the same nine-to-five (or ten-to-six) work schedule.
• Some people do not work well in pairs, and some pairs do not work well together.
23
Pair Programming
• 2x4 Pair Programming Rotation
• http://www.youtube.com/watch?v=TzUNGOVrhWs
24
Alternative Approaches
• Automated Reviews:
• A review conducted by a computer. (Tool-assisted)
• Reduced manual cost of code reviews
• Fast, consistent, and repeatable
• Removes emotion from the reviews: pride, ego, and ownership need to be
constantly recognized when conducting a review
• In some cases you have tools that allow for real-time reviews, such as the
Eclipse plug-in CodePro Analytix or Resharper for C#. These tools perform an
examination of the code as it is being written.
25
Automated file-
gathering,
combined display,
automated metrics
collection, etc
Recent Examples
Jan 2018
• Massive CPU (Intel) flaws get a name: Meltdown and Spectre
• both potentially allow hackers to steal personal data from computers,
including mobile devices and cloud servers, without leaving a trace
Feb 2018
• Cisco has issued patches for the vulnerability, which could be up
to seven years old.
• The vulnerability received a Common Vulnerability Scoring System base
score of 10.0, the highest possible. It was first discovered by Cedric
Halbronn, a researcher with NCC Group
Read the advisories and updates
• Juniper
• https://kb.juniper.net/InfoCenter/index?page=content&channel=SECURITY_ADVISORIES
• CISCO
• https://tools.cisco.com/security/center/publicationListing.x
• Huawei
• https://www.huawei.com/en/rss-feeds/psirt
Technical Portion
Code review checklist:
Data reference errors
• Is an un-initialized variable referenced?
• Are array subscripts integer values and are they within the array’s
bounds?
• Are there off-by-one errors in indexing operations or references to
arrays?
• Is a variable used where a constant would work better?
• Is a variable assigned a value that’s of a different type than the
variable?
• Is memory allocated for referenced pointers?
• Are data structures that are referenced in different functions
defined identically?
Code review checklist:
Data declaration errors
• Are the variables assigned he correct length, type, storage class?
• E.g. should a variable be declared a string instead of an array of characters?
• If a variable is initialized at its declaration, is it properly
initialized and consistent with its type?
• Are there any variable with similar names?
• Are there any variables declared that are never referenced or just
referenced once (should be a constant)?
• Are all variables explicitly declared within a specific module?
Code review checklist:
Computation errors
• Do any calculations that use variables have different data types?
• E.g., add a floating-point number to an integer
• Do any calculations that use variables have the same data type but are different
size?
• E.g., add a long integer to a short integer
• Are the compiler’s conversion rules for variables of inconsistent type or size
understood?
• Is overflow or underflow in the middle of a numeric calculation possible?
• Is it ever possible for a divisor/modulus to be 0?
• Can a variable’s value go outside its meaningful range?
• E.g., can a probability be less than 0% or greater than 100%?
• Are parentheses needed to clarify operator presence rules?
Code review checklist:
Comparison errors
• Are the comparisons correct?
• E.g., < instead of <=
• Are there comparisons between floating-point values?
• E.g., is 1.0000001 close enough to 1.0000002 to be equal?
• Are the operands of a Boolean operator Boolean?
• E.g., in C 0 is false and non-0 is true
Code review checklist:
Control flow errors
• Do the loops terminate? If not, is that by design?
• Does every switch statement have a default clause?
• Are there switch statements nested in loops?
• E.g., careful because break statements in switch statements will not exit
the loop … but break statements not in switch statements will exit the loop.
• Is it possible that a loop never executes? If it acceptable if it
doesn’t?
• Does the compiler support short-circuiting in expression evaluation?
Code review checklist:
Subroutine parameter errors
• If constants are passed to the subroutine as arguments are they
accidentally changed in the subroutine?
• Do the units of each parameter match the units of each
corresponding argument?
• E.g., English versus metric
• This is especially pertinent for SOA components
• Do the types and sizes of the parameters received by a subroutine
match those sent by the calling code?
Code review checklist:
Input/Output errors
• If the file or peripheral is not ready, is that error condition handled?
• Does the software handle the situation of the external device being
disconnected?
• Have all error messages been checked for correctness,
appropriateness, grammar, and spelling?
• Are all exceptions handled by some part of the code?
• Does the software adhere to the specified format of the date being
read from or written to the external device?
Code review checklist:
Other checks
• Does your code pass the lint test?
• E.g., How about gcc compiler warnings?
• Is your code portable to other OS platforms?
• Does the code handle ASCII and Unicode?
• How about internationalization issues?
• Does your code rely on deprecated APIs?
• Will your code port to architectures with different byte orderings?
• E.g., little (increasing numeric significance with increasing memory addresses) versus big
(the opposite of little) endian?
• Code Review Checklist
• Clarity
• Is the code clear and easy to understand?
• Did the programmer unnecessarily obfuscate any part of it?
• Can the code be refactored to make it clearer?
• Maintainability
• Will other programmers be able to maintain this code?
• Is it well commented and documented properly?
• Accuracy
• Does the code accomplish what it is meant to do?
• If an algorithm is being implemented, is it implemented correctly?
• Readability and Robustness
• Is the code fault-tolerant? Is the code error-tolerant?
• Will it handle abnormal conditions or malformed input?
• Does it fail gracefully if it encounters an unexpended condition?
• Security
• Is the code vulnerable to unauthorized access, malicious use, or modification?
• Scalability
• Could the code be a bottleneck that prevents the system from growing to accommodate
increase load, data, users, or input?
• Reusability
• Could this code be reused in other applications?
• Can it be made more general?
• Efficiency
• Does the code make efficient use if memory, CPU cycles, bandwidth, or other system
resources?
• Can it be optimized?
41

Weitere ähnliche Inhalte

Was ist angesagt?

Software coding and testing
Software coding and testingSoftware coding and testing
Software coding and testingSandeep Kumar Nayak
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetQA or the Highway
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assuranceBenjamin Baumann
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsPerfecto by Perforce
 
Intro to software development
Intro to software developmentIntro to software development
Intro to software developmentHawkman Academy
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Conceptswesovi
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Agile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
Agile vs. DevOps for Continuous Testing: How to Optimize Your PipelineAgile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
Agile vs. DevOps for Continuous Testing: How to Optimize Your PipelinePerfecto by Perforce
 
Quality Assurance Guidelines
Quality Assurance GuidelinesQuality Assurance Guidelines
Quality Assurance GuidelinesTim Stribos
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationBlue Elephant Consulting
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDDAhmed Misbah
 
Acceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDAcceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDLaurent PY
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptMark Daggett
 
Static Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with CoverityStatic Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with CoveritySamsung Open Source Group
 
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...RootedCON
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisMikalai Alimenkou
 
Migrate to microservices
Migrate to microservicesMigrate to microservices
Migrate to microservicesAndrey Trubitsyn
 
Why you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software companyWhy you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software companyMatts Devriendt
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedMichael Palotas
 

Was ist angesagt? (20)

Software coding and testing
Software coding and testingSoftware coding and testing
Software coding and testing
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester Skillset
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assurance
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOps
 
Intro to software development
Intro to software developmentIntro to software development
Intro to software development
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Concepts
 
09 coding standards_n_guidelines
09 coding standards_n_guidelines09 coding standards_n_guidelines
09 coding standards_n_guidelines
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Agile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
Agile vs. DevOps for Continuous Testing: How to Optimize Your PipelineAgile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
Agile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
 
Quality Assurance Guidelines
Quality Assurance GuidelinesQuality Assurance Guidelines
Quality Assurance Guidelines
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDD
 
Acceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDDAcceptance Testing Driven Development, TDD
Acceptance Testing Driven Development, TDD
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScript
 
Static Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with CoverityStatic Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with Coverity
 
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysis
 
Migrate to microservices
Migrate to microservicesMigrate to microservices
Migrate to microservices
 
Why you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software companyWhy you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software company
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
 

Ă„hnlich wie Capability Building for Cyber Defense: Software Walk through and Screening

White box testing
White box testingWhite box testing
White box testingNeethu Tressa
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practicesjeetendra mandal
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionJosh Gough
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxtaxegap762
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software DevelopmentAhmet Bulut
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextPerfecto by Perforce
 
Recent and-future-trends spm
Recent and-future-trends spmRecent and-future-trends spm
Recent and-future-trends spmPrakash Poudel
 
Unit3 software review control software
Unit3 software review control softwareUnit3 software review control software
Unit3 software review control softwareReetesh Gupta
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsShafiul Azam Chowdhury
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
Reduce Third Party Developer Risks
Reduce Third Party Developer RisksReduce Third Party Developer Risks
Reduce Third Party Developer RisksKevo Meehan
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Developmentbsadd
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdfHasankaNayanjith
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality ToolsAnju ML
 

Ă„hnlich wie Capability Building for Cyber Defense: Software Walk through and Screening (20)

White box testing
White box testingWhite box testing
White box testing
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practices
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Code Inspection
Code InspectionCode Inspection
Code Inspection
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptx
 
Unit iv
Unit ivUnit iv
Unit iv
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps Next
 
Recent and-future-trends spm
Recent and-future-trends spmRecent and-future-trends spm
Recent and-future-trends spm
 
Unit3 software review control software
Unit3 software review control softwareUnit3 software review control software
Unit3 software review control software
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
 
SE Unit-1.pptx
SE Unit-1.pptxSE Unit-1.pptx
SE Unit-1.pptx
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Reduce Third Party Developer Risks
Reduce Third Party Developer RisksReduce Third Party Developer Risks
Reduce Third Party Developer Risks
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Development
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdf
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 

Mehr von Maven Logix

Transforming Healthcare Through Telemedicine
Transforming Healthcare Through Telemedicine Transforming Healthcare Through Telemedicine
Transforming Healthcare Through Telemedicine Maven Logix
 
Concepts and Rights About Data Privacy and Security
Concepts and Rights About Data Privacy and SecurityConcepts and Rights About Data Privacy and Security
Concepts and Rights About Data Privacy and SecurityMaven Logix
 
How to Response Cyber Data Breaches at Pakistan
How to Response Cyber Data Breaches at PakistanHow to Response Cyber Data Breaches at Pakistan
How to Response Cyber Data Breaches at PakistanMaven Logix
 
Identity Theft and How to Prevent Them in the Digital Age
Identity Theft and How to Prevent Them in the Digital Age Identity Theft and How to Prevent Them in the Digital Age
Identity Theft and How to Prevent Them in the Digital Age Maven Logix
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance TuningMaven Logix
 
Information Technology in Renewable Energy
Information Technology in Renewable EnergyInformation Technology in Renewable Energy
Information Technology in Renewable EnergyMaven Logix
 

Mehr von Maven Logix (6)

Transforming Healthcare Through Telemedicine
Transforming Healthcare Through Telemedicine Transforming Healthcare Through Telemedicine
Transforming Healthcare Through Telemedicine
 
Concepts and Rights About Data Privacy and Security
Concepts and Rights About Data Privacy and SecurityConcepts and Rights About Data Privacy and Security
Concepts and Rights About Data Privacy and Security
 
How to Response Cyber Data Breaches at Pakistan
How to Response Cyber Data Breaches at PakistanHow to Response Cyber Data Breaches at Pakistan
How to Response Cyber Data Breaches at Pakistan
 
Identity Theft and How to Prevent Them in the Digital Age
Identity Theft and How to Prevent Them in the Digital Age Identity Theft and How to Prevent Them in the Digital Age
Identity Theft and How to Prevent Them in the Digital Age
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance Tuning
 
Information Technology in Renewable Energy
Information Technology in Renewable EnergyInformation Technology in Renewable Energy
Information Technology in Renewable Energy
 

KĂĽrzlich hochgeladen

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

KĂĽrzlich hochgeladen (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Capability Building for Cyber Defense: Software Walk through and Screening

  • 1. Software Walkthrough and Screening Capability Building for Cyber Defense Dr. Fahim Arif (PhD in Software Engineering) Director R&D Senior Member IEEE MCS (NUST)
  • 2. The life of a cyber threat Let us what is a cyber threat
  • 3. Premise • Today’s need – modern equipment/ gadgets • Hardware and software • Foreign dependency National Level • Indigenization ------ desire and need • Local industry/ R&D ????????????????????? • Academia • Manpower/ HR
  • 4.
  • 5.
  • 6.
  • 7. What to do? • Screening of Hw and Sw • Software and code walkthrough • Back doors • Channels • Malwares • Hidden traps
  • 8. How to do it? • Software or Code Walkthroughs • Code Reviews • Software Inspections • Paired Programming • Alternative Approaches 9 Generally, not technically
  • 9. DEFINITION In software engineering, a walkthrough is a form of software peer review "in which a designer or programmer leads members of the development team and other interested parties go through a software product, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems. [IEEE Std. 1028-1997, IEEE Standard for Software Reviews, clause 3.8] Software Walkthroughs
  • 10. Software Walkthroughs • Methodology • A walkthrough is an informal way of presenting a technical document in a meeting. • An author or coordinator runs the walkthrough: calling the meeting, inviting the reviewers, soliciting comments and ensuring that everyone present understands the work product. • Walkthroughs are used when the author of a work product needs to take into account the perspective of someone who does not have the technical expertise to review the document. • After the meeting, the author should follow up with individual attendees who may have had additional information or insights. The document should then be corrected to reflect any issues that were raised. 13
  • 11. • Verify that everyone is present for this activity. This can include users, stakeholders, engineering leads, managers and others • Ensure that everyone present understands the purpose of the walkthrough and how the material is to be presented. • Describe each section of the material to be covered by the walkthrough. • Present the material in each section, ensure that everyone present understands the material. • Lead a discussion to identify any missing sections or material. • Document all issues that are raised by walkthrough attendees. 14Guidelines for a Successful Walkthrough
  • 12. • For more information about Walkthroughs: • http://www.jodypaul.com/SWE/WT/walkthroughs.html#types 15 Software Walkthroughs
  • 13. Code Review • A code review is a special kind of inspection in which the team examines a sample of code and fixes any defects in it. • In a code review, a defect is a block of code which does not properly implement its requirements, which does not function as the programmer intended, or which is not incorrect but could be improved • For example, it could be made more readable or its performance could be improved 16
  • 14. Code Review • It’s important to review the code which is most likely to have defects. This will generally be the most complex, tricky or involved code. • Good candidates for code review include: • A portion of the software that only one person has the expertise to maintain • Code that implements a highly abstract or tricky algorithm • An object, library or API that is particularly difficult to work with • Code written by someone who is inexperienced or has not written that kind of code before, or written in an unfamiliar language • Code which employs a new programming technique • An area of the code that will be especially catastrophic if there are defects 17
  • 15. Code Review • Meetings are not the answer, why? http://vimeo.com/29531712 • Can’t see the new code working. • Only covers other important code, which can leave mistakes or errors in other code. • Hard to track changes in larger reviews. • Using tools allows: • Gathering changed files over multiple iterations of changes. • No meetings required the review can be done at any time by any number of reviewers. • All conversations, changes, and defects are tracked. • Requires all participants to verify the code before the review is completed. 18
  • 17. Essential elements of a formal code review • Identify problems: • Find problems with the software such as missing items, mistakes, etc. • Follow rules: • Amount of code to be reviewed, how much time will be spent, etc. • Prepare: • Each participant should prepare in order to contribute to the review. • Write a report: • Summarize the results of the review, make report available to the development team.
  • 18. Formal code inspections • Code presenter is not the author of the code. • The other participants are the inspectors. • There is a moderator to assure that the rules are followed and the meeting runs smoothly. • After the inspection a report is composed. The programmer then makes changes and a re-inspection occurs, if necessary. • Formal code inspections are effective at finding bugs in code and designs and are gaining in popularity.
  • 19. Pair Programming • Pair programming is a technique in which two programmers work simultaneously at a single computer and continuously review each others’ work. • Although many programmers were introduced to pair programming as a part of Extreme Programming, it is a practice that can be valuable in any development environment. • Pair programming improves the organization by ensuring that at least two programmers are able to maintain any piece of the software. 22
  • 20. Pair Programming (pros and cons) • In pair programming, two programmers sit at one computer to write code. Generally, one programmer will take control and write code, while the other watches and advises. • Some teams have found that pair programming works best for them if the pairs are constantly rotated; this helps diffuse the shared knowledge throughout the organization. Others prefer to pair a more junior person with a more senior for knowledge sharing. • The project manager should not try to force pair programming on the team; it helps to introduce the change slowly, and where it will meet the least resistance. • It is difficult to implement pair programming in an organization where the programmers do not share the same nine-to-five (or ten-to-six) work schedule. • Some people do not work well in pairs, and some pairs do not work well together. 23
  • 21. Pair Programming • 2x4 Pair Programming Rotation • http://www.youtube.com/watch?v=TzUNGOVrhWs 24
  • 22. Alternative Approaches • Automated Reviews: • A review conducted by a computer. (Tool-assisted) • Reduced manual cost of code reviews • Fast, consistent, and repeatable • Removes emotion from the reviews: pride, ego, and ownership need to be constantly recognized when conducting a review • In some cases you have tools that allow for real-time reviews, such as the Eclipse plug-in CodePro Analytix or Resharper for C#. These tools perform an examination of the code as it is being written. 25 Automated file- gathering, combined display, automated metrics collection, etc
  • 23. Recent Examples Jan 2018 • Massive CPU (Intel) flaws get a name: Meltdown and Spectre • both potentially allow hackers to steal personal data from computers, including mobile devices and cloud servers, without leaving a trace Feb 2018 • Cisco has issued patches for the vulnerability, which could be up to seven years old. • The vulnerability received a Common Vulnerability Scoring System base score of 10.0, the highest possible. It was first discovered by Cedric Halbronn, a researcher with NCC Group
  • 24. Read the advisories and updates • Juniper • https://kb.juniper.net/InfoCenter/index?page=content&channel=SECURITY_ADVISORIES • CISCO • https://tools.cisco.com/security/center/publicationListing.x • Huawei • https://www.huawei.com/en/rss-feeds/psirt
  • 26.
  • 27. Code review checklist: Data reference errors • Is an un-initialized variable referenced? • Are array subscripts integer values and are they within the array’s bounds? • Are there off-by-one errors in indexing operations or references to arrays? • Is a variable used where a constant would work better? • Is a variable assigned a value that’s of a different type than the variable? • Is memory allocated for referenced pointers? • Are data structures that are referenced in different functions defined identically?
  • 28. Code review checklist: Data declaration errors • Are the variables assigned he correct length, type, storage class? • E.g. should a variable be declared a string instead of an array of characters? • If a variable is initialized at its declaration, is it properly initialized and consistent with its type? • Are there any variable with similar names? • Are there any variables declared that are never referenced or just referenced once (should be a constant)? • Are all variables explicitly declared within a specific module?
  • 29. Code review checklist: Computation errors • Do any calculations that use variables have different data types? • E.g., add a floating-point number to an integer • Do any calculations that use variables have the same data type but are different size? • E.g., add a long integer to a short integer • Are the compiler’s conversion rules for variables of inconsistent type or size understood? • Is overflow or underflow in the middle of a numeric calculation possible? • Is it ever possible for a divisor/modulus to be 0? • Can a variable’s value go outside its meaningful range? • E.g., can a probability be less than 0% or greater than 100%? • Are parentheses needed to clarify operator presence rules?
  • 30. Code review checklist: Comparison errors • Are the comparisons correct? • E.g., < instead of <= • Are there comparisons between floating-point values? • E.g., is 1.0000001 close enough to 1.0000002 to be equal? • Are the operands of a Boolean operator Boolean? • E.g., in C 0 is false and non-0 is true
  • 31. Code review checklist: Control flow errors • Do the loops terminate? If not, is that by design? • Does every switch statement have a default clause? • Are there switch statements nested in loops? • E.g., careful because break statements in switch statements will not exit the loop … but break statements not in switch statements will exit the loop. • Is it possible that a loop never executes? If it acceptable if it doesn’t? • Does the compiler support short-circuiting in expression evaluation?
  • 32. Code review checklist: Subroutine parameter errors • If constants are passed to the subroutine as arguments are they accidentally changed in the subroutine? • Do the units of each parameter match the units of each corresponding argument? • E.g., English versus metric • This is especially pertinent for SOA components • Do the types and sizes of the parameters received by a subroutine match those sent by the calling code?
  • 33. Code review checklist: Input/Output errors • If the file or peripheral is not ready, is that error condition handled? • Does the software handle the situation of the external device being disconnected? • Have all error messages been checked for correctness, appropriateness, grammar, and spelling? • Are all exceptions handled by some part of the code? • Does the software adhere to the specified format of the date being read from or written to the external device?
  • 34. Code review checklist: Other checks • Does your code pass the lint test? • E.g., How about gcc compiler warnings? • Is your code portable to other OS platforms? • Does the code handle ASCII and Unicode? • How about internationalization issues? • Does your code rely on deprecated APIs? • Will your code port to architectures with different byte orderings? • E.g., little (increasing numeric significance with increasing memory addresses) versus big (the opposite of little) endian?
  • 35. • Code Review Checklist • Clarity • Is the code clear and easy to understand? • Did the programmer unnecessarily obfuscate any part of it? • Can the code be refactored to make it clearer? • Maintainability • Will other programmers be able to maintain this code? • Is it well commented and documented properly? • Accuracy • Does the code accomplish what it is meant to do? • If an algorithm is being implemented, is it implemented correctly? • Readability and Robustness • Is the code fault-tolerant? Is the code error-tolerant? • Will it handle abnormal conditions or malformed input? • Does it fail gracefully if it encounters an unexpended condition? • Security • Is the code vulnerable to unauthorized access, malicious use, or modification? • Scalability • Could the code be a bottleneck that prevents the system from growing to accommodate increase load, data, users, or input? • Reusability • Could this code be reused in other applications? • Can it be made more general? • Efficiency • Does the code make efficient use if memory, CPU cycles, bandwidth, or other system resources? • Can it be optimized? 41