<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Noah Mugaya</title>
    <description>The latest articles on DEV Community by Noah Mugaya (@paragonnoah).</description>
    <link>https://dev.to/paragonnoah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F877225%2F7430e913-a0fa-4e0a-acac-5ed1a6aed338.jpg</url>
      <title>DEV Community: Noah Mugaya</title>
      <link>https://dev.to/paragonnoah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/paragonnoah"/>
    <language>en</language>
    <item>
      <title>HACKING A BANK</title>
      <dc:creator>Noah Mugaya</dc:creator>
      <pubDate>Thu, 21 Jul 2022 06:00:50 +0000</pubDate>
      <link>https://dev.to/paragonnoah/hacking-a-bank-5lb</link>
      <guid>https://dev.to/paragonnoah/hacking-a-bank-5lb</guid>
      <description>&lt;h2&gt;
  
  
  Advanced Banking Logic Vulnerabilities
&lt;/h2&gt;

&lt;p&gt;_**&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LKz0ozzr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/is09dhji3sc5t8f3cgkv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LKz0ozzr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/is09dhji3sc5t8f3cgkv.jpeg" alt="Image description" width="300" height="168"&gt;&lt;/a&gt;&lt;br&gt;
_Banks form the core of the economy. Today, Cyber Attacks are taking place daily and banks worldwide are affected.&lt;/p&gt;

&lt;p&gt;In the past year, we have observed the security of various banks in terms of mobile application security. The security flaws described are those due to poor programming practices_&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Flaws can be elucidated as follows&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Replay Attack
2.Bypassing payment to a malicious beneficiary
3.Bypass Challenge Response in 2FA&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;In order to describe the attacks, consider a fictional bank, “HACKED Bank”. The customers of the bank are censy and shodan, and the hacker is Noah. We want to reflect flaws in logic, and we use Charles Proxy to sniff SSL traffic between the mobile bank and the bank server.&lt;/p&gt;

&lt;p&gt;A mobile banking application should allow the users to perform a subset of operations they can perform at the bank. Thus we lay down our assumptions of how the mobile banking application should actually function. While making a payment, a payment request should be valid only once. Similarly, transfers should be possible only to approved and trusted beneficiaries. Moving on to the challenge response, banks, as an added layer of security may ask for certain digits of a password (like 2nd,3rd and 7th digit), or a similar form of secondary authentication. Only upon responding with what was asked for, is the transaction processed&lt;br&gt;
**&lt;br&gt;
1). Replay Attack&lt;br&gt;
**&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MrMzPaSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ymridd66jw0egt3b9nt1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MrMzPaSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ymridd66jw0egt3b9nt1.jpeg" alt="Image description" width="259" height="194"&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Suppose censy is transferring money to shodan through the mobile banking application. The payment request should be valid only once. Any attempts to provide the same to the bank should be treated as invalid. In a practical scenario, suppose censy is transferring 10$ to shodan legitimately. censy can pair up with the hacker Noah, and can have replay the request 10 times. Thus 90$ is siphoned off from shodan’s account without her authorisation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The defence against replay attacks is a nonce, or a secret between the client and the server as a function of time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Bypass Payment Attack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mg8osALm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iybf6hsdbcpdak2l3jvi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mg8osALm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iybf6hsdbcpdak2l3jvi.jpeg" alt="Image description" width="340" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As part of everyday business, censy transfers 100 $ to shodan. This is a valid transaction since shodan exists in the list of approved beneficiaries.&lt;/p&gt;

&lt;p&gt;The steps in completing a transaction are as follows-&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;censy-&amp;gt;Server : Transfer 100$ to shodan

Server-&amp;gt; censy: OK ; Give me authentication numbers : 1 , 5 ,8

censy-&amp;gt;Server : Transfer 100$ to shodan ; Authentication 1:22 5:45 8:12

Transfer Successful
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The Authentication characters can be considered to be Key Value pairs, where there are 16 Keys 1…16. There exist authentication digits for each of these&lt;/p&gt;

&lt;p&gt;The Bypass payment hack happens in step 3. Eve, the adversary can tamper the request as&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3. censy-&amp;gt; Server : Transfer 10000$ to Eve ; Authentication 1:22 5:45 8:12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The server accepts it, and the transfer is successful. The problem is&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Lack of check in step 3, if recipient is a beneficiary
State not maintained between step 1 and 3.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Thus money can be diverted to malicious entities.&lt;/p&gt;

&lt;p&gt;**3. Two Factor Authentication Bypass&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CD9X3jtC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxja3nj01etfovnxdqcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CD9X3jtC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxja3nj01etfovnxdqcq.png" alt="Image description" width="312" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As described in the transaction steps, authentication values need to be provided. The server asks for 3 values randomly out of 16, as a two factor auth.&lt;/p&gt;

&lt;p&gt;An attack is changing the challenge response questions.&lt;/p&gt;

&lt;p&gt;In Step 2, When the Bank asks for the 2FA&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2. Server-&amp;gt; censy: OK ; Give me authentication numbers : 1 , 5 ,8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Eve can tamper with the request response, and provide the 3 valid key value pairs she knows. Thus irrespective of what the server asks for, Eve can provide the key value pairs she knows, and the transaction still goes through. Thus she effectively bypasses the security mechanism since she can spoof each transaction.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;censy-&amp;gt;Server : Transfer 100$ to shodan ; Authentication 1:22 2:99 3:10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This attack is an advanced one, and requires Eve to possess the session key. However once she has it by sniffing a live transaction, By combining vulnerability 2 &amp;amp; 3, She can create malicious transactions.&lt;/p&gt;

&lt;p&gt;These flaws are related to the logic and may not fall under the banks threat model, as they assume the application to be in the trusted computing base. However, this assumption, may not hold true, given how easy it is to poison the phone certificate store through an application with misleading permissions.&lt;/p&gt;

&lt;p&gt;Public Key Pinning would solve the problem in the sniffing, However there may be an adversary sniffing traffic on the first install and run of the banking application. In addition, these logic vulnerabilities would exist even in the web banking application.&lt;/p&gt;

&lt;p&gt;At Spherical Defence (neural.ai), we are developing technology for banks to detect intrusion attempts real time using Deep Learning by learning grammar and the semantics of trusted communication.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GzXO9GyF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x16ji7yuzj4ynr2z2r32.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GzXO9GyF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x16ji7yuzj4ynr2z2r32.jpeg" alt="Image description" width="259" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>nosql</category>
      <category>node</category>
    </item>
    <item>
      <title>INTRODUCTION TO DATA STRUCTURE AND ALGORITHMS :</title>
      <dc:creator>Noah Mugaya</dc:creator>
      <pubDate>Tue, 28 Jun 2022 17:28:33 +0000</pubDate>
      <link>https://dev.to/paragonnoah/introduction-to-data-structure-and-algorithms--136d</link>
      <guid>https://dev.to/paragonnoah/introduction-to-data-structure-and-algorithms--136d</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Data Structures and Algorithms
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective way. Data Structures is about rendering data elements in terms of some relationship, for better organization and storage. For example, we have some data which has, player's name "Virat" and age 26. Here "Virat" is of String data type and 26 is of integer data type.&lt;/p&gt;

&lt;p&gt;We can organize this data as a record like Player record, which will have both player's name and age in it. Now we can collect and store player's records in a file or database as a data structure. For example: "Dhoni" 30, "Gambhir" 31, "Sehwag" 33&lt;/p&gt;

&lt;p&gt;If you are aware of Object Oriented programming concepts, then a class also does the same thing, it collects different type of data under one single entity. The only difference being, data structures provides for techniques to access and manipulate data efficiently.&lt;/p&gt;

&lt;p&gt;In simple language, Data Structures are structures programmed to store ordered data, so that various operations can be performed on it easily. It represents the knowledge of data to be organized in memory. It should be designed and implemented in such a way that it reduces the complexity and increases the efficiency.&lt;/p&gt;

&lt;p&gt;Basic types of Data Structures&lt;br&gt;
As we have discussed above, anything that can store data can be called as a data structure, hence Integer, Float, Boolean, Char etc, all are data structures. They are known as Primitive Data Structures.&lt;/p&gt;

&lt;p&gt;Then we also have some complex Data Structures, which are used to store large and connected data. Some example of Abstract Data Structure are :&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Linked List&lt;br&gt;
Tree&lt;br&gt;
Graph&lt;br&gt;
Stack, Queue etc&lt;/em&gt;.&lt;br&gt;
All these data structures allow us to perform different operations on data. We select these data structures based on which type of operation is required. We will look into these data structures in more details in our later lessons.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Introduction to Data Structures
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The data structures can also be classified on the basis of the following characteristics:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characterstic Description&lt;/strong&gt;&lt;br&gt;
Linear  In Linear data structures,the data items are arranged in a linear sequence. Example: Array&lt;br&gt;
Non-Linear  In Non-Linear data structures,the data items are not in sequence. Example: Tree, Graph&lt;br&gt;
Homogeneous In homogeneous data structures,all the elements are of same type. Example: Array&lt;br&gt;
Non-Homogeneous In Non-Homogeneous data structure, the elements may or may not be of the same type. Example: Structures&lt;br&gt;
Static  Static data structures are those whose sizes and structures associated memory locations are fixed, at compile time. Example: Array&lt;br&gt;
Dynamic Dynamic structures are those which expands or shrinks depending upon the program need and its execution. Also, their associated memory locations changes. Example: Linked List created using pointers&lt;br&gt;
What is an Algorithm ?&lt;br&gt;
An algorithm is a finite set of instructions or logic, written in order, to accomplish a certain predefined task. Algorithm is not the complete code or program, it is just the core logic(solution) of a problem, which can be expressed either as an informal high level description as pseudocode or using a flowchart.&lt;/p&gt;

&lt;p&gt;Every Algorithm must satisfy the following properties:&lt;/p&gt;

&lt;p&gt;Input- There should be 0 or more inputs supplied externally to the algorithm.&lt;br&gt;
Output- There should be atleast 1 output obtained.&lt;br&gt;
Definiteness- Every step of the algorithm should be clear and well defined.&lt;br&gt;
Finiteness- The algorithm should have finite number of steps.&lt;br&gt;
Correctness- Every step of the algorithm must generate a correct output.&lt;br&gt;
An algorithm is said to be efficient and fast, if it takes less time to execute and consumes less memory space. The performance of an algorithm is measured on the basis of following properties :&lt;br&gt;
_&lt;br&gt;
Time Complexity&lt;br&gt;
Space Complexity&lt;/p&gt;

&lt;h2&gt;
  
  
  Space Complexity_
&lt;/h2&gt;

&lt;p&gt;Its the amount of memory space required by the algorithm, during the course of its execution. Space complexity must be taken seriously for multi-user systems and in situations where limited memory is available.&lt;/p&gt;

&lt;p&gt;An algorithm generally requires space for following components :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instruction Space&lt;/strong&gt;: Its the space required to store the executable version of the program. This space is fixed, but varies depending upon the number of lines of code in the program.&lt;br&gt;
&lt;strong&gt;Data Space&lt;/strong&gt;: Its the space required to store all the constants and variables(including temporary variables) value.&lt;br&gt;
&lt;strong&gt;Environment Space&lt;/strong&gt;: Its the space required to store the environment information needed to resume the suspended function.&lt;br&gt;
To learn about Space Complexity in detail, jump to the Space Complexity tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time Complexity
&lt;/h2&gt;

&lt;p&gt;Time Complexity is a way to represent the amount of time required by the program to run till its completion. It's generally a good practice to try to keep the time required minimum, so that our algorithm completes it's execution in the minimum time possible. We will study about Time Complexity in details in later sections.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>forensics volatility</title>
      <dc:creator>Noah Mugaya</dc:creator>
      <pubDate>Mon, 27 Jun 2022 09:08:07 +0000</pubDate>
      <link>https://dev.to/paragonnoah/forensics-volatility-4e88</link>
      <guid>https://dev.to/paragonnoah/forensics-volatility-4e88</guid>
      <description>&lt;p&gt;volatilitynotes.md&lt;br&gt;
TOOLS SET UP Setup on this is actually very simple, seeing we will be focusing on one tool, Volatility (GitHub). Volatility supports Linux, MacOS and Windows. Volatility is a terminal(CMD) based application, meaning you have to run it via the terminal (the GUI version Volatility WorkBench can also be used but wont be covered here seeing its a windows based GUI).&lt;br&gt;
**&lt;/p&gt;

&lt;p&gt;INSTALLING VOLATILITY Volatility&lt;br&gt;
can be installed from the official repository on Ubuntu 18.&lt;/p&gt;

&lt;p&gt;Note: The following command is for reference purposes only and should not be executed in this scenario as the VM lacks internet access by design. Volatility has already been installed.&lt;/p&gt;

&lt;p&gt;_apt install volatility -_y&lt;br&gt;
The above command installs additional packages which are dependencies of Volatility tool:&lt;/p&gt;

&lt;p&gt;... The following additional packages will be installed: dwarfdump libdistorm3-3 libjansson4 libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libtiff5 libwebp6 libwebpdemux2 libwebpmux3 libyara3 python-attr python-bs4 python-chardet python-crypto python-distorm3 python-et-xmlfile python-funcsigs python-html5lib python-jdcal python-lxml python-olefile python-openpyxl python-pil python-pkg-resources python-pluggy python-py python-pytest python-six python-tz python-webencodings python-yara volatility-tools Suggested packages: liblcms2-utils python-attr-doc python-crypto-doc python-funcsigs-doc python-genshi python-lxml-dbg python-lxml-doc python-pil-doc python-pil-dbg python-setuptools subversion python-pytest-xdist python-mock libraw1394-11 lime-forensics-dkms gcc make zip The following NEW packages will be installed: dwarfdump libdistorm3-3 libjansson4 libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libtiff5 libwebp6 libwebpdemux2 libwebpmux3 libyara3 python-attr python-bs4 python-chardet python-crypto python-distorm3 python-et-xmlfile python-funcsigs python-html5lib python-jdcal python-lxml python-olefile python-openpyxl python-pil python-pkg-resources python-pluggy python-py python-pytest python-six python-tz python-webencodings python-yara volatility volatility-tools 0 upgraded, 35 newly installed, 0 to remove and 289 not upgraded. Validate volatility installation by running the following command which outputs the tool usage command options:&lt;br&gt;
_&lt;br&gt;
volatility --help_&lt;br&gt;
Sample Output:&lt;/p&gt;

&lt;p&gt;Volatility Foundation Volatility Framework 2.6 Usage: Volatility - A memory forensics analysis platform. Options: -h, --help list all available options and their default values. Default values may be set in the configuration file (/etc/volatilityrc) --conf-file=/root/.volatilityrc User based configuration file -d, --debug Debug volatility --plugins=PLUGINS Additional plugin directories to use (colon separated) --info Print information about all registered objects --cache-directory=/root/.cache/volatility Directory where cache files are stored --cache Use caching --tz=TZ Sets the (Olson) timezone for displaying timestamps using pytz (if installed) or tzset -f FILENAME, --filename=FILENAME Filename to use when opening an image --profile=WinXPSP2x86 Name of the profile to load (use --info to see a list of supported profiles) -l LOCATION, --location=LOCATION A URN location from which to load an address space -w, --write Enable write support --dtb=DTB DTB Address --shift=SHIFT Mac KASLR shift address --output=text Output in this format (support is module specific, see the Module Output Options below) --output-file=OUTPUT_FILE Write output in this file -v, --verbose Verbose information --physical_shift=PHYSICAL_SHIFT Linux kernel physical shift address --virtual_shift=VIRTUAL_SHIFT Linux kernel virtual shift address -g KDBG, --kdbg=KDBG Specify a KDBG virtual address (Note: for 64-bit Windows 8 and above this is the address of KdCopyDataBlock) ... LABS SET UP This scenario will be using MemLabs cloned from &lt;a href="https://github.com/stuxnet999/MemLabs"&gt;https://github.com/stuxnet999/MemLabs&lt;/a&gt;. The labs contain the CTF memory images as referenced earlier.&lt;/p&gt;

&lt;p&gt;Note: The following command is for reference purposes only and should not be executed in this scenario as the VM lacks internet access by design. The labs have already been cloned located at /home/admin/labs/MemLab.&lt;/p&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/stuxnet999/MemLabs.git"&gt;https://github.com/stuxnet999/MemLabs.git&lt;/a&gt;&lt;br&gt;
The scenario will head start on the first lab, Lab 1:&lt;/p&gt;

&lt;p&gt;According to the ReadMe, this is the easiest of them all, and currently what i would urge all beginners to start from, starting from this will show you a clear path to how memory forensics work, and best of all an easier approach to what sometimes may be a huge learning curve, note also we will be learning about the tool more than the CTF itself which is crucial.&lt;/p&gt;

&lt;p&gt;VOLATILITY INTRODUCTION Lets start of by a small introduction to the tool and what exactly it does and why we would need it:&lt;/p&gt;

&lt;p&gt;Memory forensics(volatile memory) is done to a system that was live and the investigator managed to grab a copy of the memory snapshot at the current time, this would and can help us investigate a few things, including, processes, files, IP addresses(network information) ,user information heck even dump some passwords, the list is huge!!&lt;/p&gt;

&lt;p&gt;This would help an investigator find pattern to how/who attacked the system or they navigated , also find how a malware infected a system too etc. the possibilities are so many we wouldn't be able to cover them here however, take a look at volatility's wiki and read more.&lt;/p&gt;

&lt;p&gt;MEMORY FORENSICS STEPS STEP 1 Change directory to the first Lab:&lt;/p&gt;

&lt;p&gt;cd /home/ubuntu/labs/MemLabs/Lab\ 1&lt;br&gt;
Check the contents of the README.md for lab challenge description and challenge instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cat README.m&lt;/strong&gt;d&lt;br&gt;
The readme file indicates the location of the image and pretty much where to download it.&lt;/p&gt;

&lt;p&gt;Note: The image file has been downloaded and located in the Lab 1 directory.&lt;/p&gt;

&lt;p&gt;root@labs:/home/ubuntu/labs/MemLabs/Lab 1# ls MemoryDump_Lab1.raw README.md The Lab 1 readme indicates the MD5 hash value of the memory dump as b9fec1a443907d870cb32b048bda9380. Validate the hash value of the above downloaded image before proceeding:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;md5sum MemoryDump_Lab1.raw&lt;/strong&gt;&lt;br&gt;
b9fec1a443907d870cb32b048bda9380 MemoryDump_Lab1.raw STEP 2: IDENTIFY WHICH PROFILE TO USE We use plugins available on volatility to interact and manage the image , our first interaction is to identify which profile to use by first identifying what type of image and which system:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;volatility -f MemoryDump_Lab1.raw imageinfo&lt;br&gt;
Output:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Volatility Foundation Volatility Framework 2.6 INFO : volatility.debug : Determining profile based on KDBG search... Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP0x64, Win2008R2SP1x64_23418, Win2008R2SP1x64, Win7SP1x64_23418 AS Layer1 : WindowsAMD64PagedMemory (Kernel AS) AS Layer2 : FileAddressSpace (/home/ubuntu/labs/MemLabs/Lab 1/MemoryDump_Lab1.raw) PAE type : No PAE DTB : 0x187000L KDBG : 0xf800028100a0L Number of Processors : 1 Image Type (Service Pack) : 1 KPCR for CPU 0 : 0xfffff80002811d00L KUSER_SHARED_DATA : 0xfffff78000000000L Image date and time : 2019-12-11 14:38:00 UTC+0000 Image local date and time : 2019-12-11 20:08:00 +0530 STEP 3: KDGB SCAN The KDBG is a structure maintained by the Windows kernel for debugging purposes. It contains a list of the running processes and loaded kernel modules. It also contains some version information that allows you to determine if a memory dump came from a Windows XP system versus Windows 7, what Service Pack was installed, and the memory model (32-bit vs 64-bit).&lt;/p&gt;

&lt;p&gt;Say you have a raw image with the profile Windows 7 SP2 etc, but doesn't show any processes from Pslist (another plugin), so we proceed ahead and use the first profile suggested : (on our case we do not need KDBG) but heres how to do it anyways):&lt;/p&gt;

&lt;p&gt;volatility -f MemoryDump_Lab1.raw --profile=Win7SP1x64 kdbgscan&lt;br&gt;
Output:&lt;br&gt;
_&lt;br&gt;
Volatility Foundation Volatility Framework 2.6_&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win7SP1x64 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0)&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win7SP0x64 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0)&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win2008R2SP1x64 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0)&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win7SP1x64_23418 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0)&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win2008R2SP0x64 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0)&lt;/p&gt;

&lt;p&gt;Instantiating KDBG using: Kernel AS Win7SP1x64 (6.1.7601 64bit) Offset (V) : 0xf800028100a0 Offset (P) : 0x28100a0 KDBG owner tag check : True Profile suggestion (KDBGHeader): Win2008R2SP1x64_23418 Version64 : 0xf80002810068 (Major: 15, Minor: 7601) Service Pack (CmNtCSDVersion) : 1 Build string (NtBuildLab) : 7601.17514.amd64fre.win7sp1_rtm. PsActiveProcessHead : 0xfffff80002846b90 (48 processes) PsLoadedModuleList : 0xfffff80002864e90 (140 modules) KernelBase : 0xfffff8000261f000 (Matches MZ: True) Major (OptionalHeader) : 6 Minor (OptionalHeader) : 1 KPCR : 0xfffff80002811d00 (CPU 0) STEP 4: LIST PROCESSES CAPTURED Basically as noted PSLIST shows a list of process on the captured memory image of applications that were running on the system as per the image collection:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;volatility -f MemoryDump_Lab1.raw --profile=Win7SP1x64 pslist Output:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Volatility Foundation Volatility Framework 2.6 Offset(V) Name PID PPID Thds Hnds Sess Wow64 Start Exit&lt;/p&gt;

&lt;p&gt;0xfffffa8000ca0040 System 4 0 80 570 ------ 0 2019-12-11 13:41:25 UTC+0000&lt;br&gt;
0xfffffa800148f040 smss.exe 248 4 3 37 ------ 0 2019-12-11 13:41:25 UTC+0000&lt;br&gt;
0xfffffa800154f740 csrss.exe 320 312 9 457 0 0 2019-12-11 13:41:32 UTC+0000&lt;br&gt;
0xfffffa8000ca81e0 csrss.exe 368 360 7 199 1 0 2019-12-11 13:41:33 UTC+0000&lt;br&gt;
0xfffffa8001c45060 psxss.exe 376 248 18 786 0 0 2019-12-11 13:41:33 UTC+0000&lt;br&gt;
0xfffffa8001c5f060 winlogon.exe 416 360 4 118 1 0 2019-12-11 13:41:34 UTC+0000&lt;br&gt;
0xfffffa8001c5f630 wininit.exe 424 312 3 75 0 0 2019-12-11 13:41:34 UTC+0000&lt;br&gt;
0xfffffa8001c98530 services.exe 484 424 13 219 0 0 2019-12-11 13:41:35 UTC+0000&lt;br&gt;
0xfffffa8001ca0580 lsass.exe 492 424 9 764 0 0 2019-12-11 13:41:35 UTC+0000&lt;br&gt;
0xfffffa8001ca4b30 lsm.exe 500 424 11 185 0 0 2019-12-11 13:41:35 UTC+0000&lt;br&gt;
0xfffffa8001cf4b30 svchost.exe 588 484 11 358 0 0 2019-12-11 13:41:39 UTC+0000&lt;br&gt;
0xfffffa8001d327c0 VBoxService.ex 652 484 13 137 0 0 2019-12-11 13:41:40 UTC+0000&lt;br&gt;
0xfffffa8001d49b30 svchost.exe 720 484 8 279 0 0 2019-12-11 13:41:41 UTC+0000&lt;br&gt;
0xfffffa8001d8c420 svchost.exe 816 484 23 569 0 0 2019-12-11 13:41:42 UTC+0000&lt;br&gt;
0xfffffa8001da5b30 svchost.exe 852 484 28 542 0 0 2019-12-11 13:41:43 UTC+0000&lt;br&gt;
0xfffffa8001da96c0 svchost.exe 876 484 32 941 0 0 2019-12-11 13:41:43 UTC+0000&lt;br&gt;
0xfffffa8001e1bb30 svchost.exe 472 484 19 476 0 0 2019-12-11 13:41:47 UTC+0000&lt;br&gt;
0xfffffa8001e50b30 svchost.exe 1044 484 14 366 0 0 2019-12-11 13:41:48 UTC+0000&lt;br&gt;
0xfffffa8001eba230 spoolsv.exe 1208 484 13 282 0 0 2019-12-11 13:41:51 UTC+0000&lt;br&gt;
0xfffffa8001eda060 svchost.exe 1248 484 19 313 0 0 2019-12-11 13:41:52 UTC+0000&lt;br&gt;
0xfffffa8001f58890 svchost.exe 1372 484 22 295 0 0 2019-12-11 13:41:54 UTC+0000&lt;br&gt;
0xfffffa8001f91b30 TCPSVCS.EXE 1416 484 4 97 0 0 2019-12-11 13:41:55 UTC+0000&lt;br&gt;
0xfffffa8000d3c400 sppsvc.exe 1508 484 4 141 0 0 2019-12-11 14:16:06 UTC+0000&lt;br&gt;
0xfffffa8001c38580 svchost.exe 948 484 13 322 0 0 2019-12-11 14:16:07 UTC+0000&lt;br&gt;
0xfffffa8002170630 wmpnetwk.exe 1856 484 16 451 0 0 2019-12-11 14:16:08 UTC+0000&lt;br&gt;
0xfffffa8001d376f0 SearchIndexer. 480 484 14 701 0 0 2019-12-11 14:16:09 UTC+0000&lt;br&gt;
0xfffffa8001eb47f0 taskhost.exe 296 484 8 151 1 0 2019-12-11 14:32:24 UTC+0000&lt;br&gt;
0xfffffa8001dfa910 dwm.exe 1988 852 5 72 1 0 2019-12-11 14:32:25 UTC+0000&lt;br&gt;
0xfffffa8002046960 explorer.exe 604 2016 33 927 1 0 2019-12-11 14:32:25 UTC+0000&lt;br&gt;
0xfffffa80021c75d0 VBoxTray.exe 1844 604 11 140 1 0 2019-12-11 14:32:35 UTC+0000&lt;br&gt;
0xfffffa80021da060 audiodg.exe 2064 816 6 131 0 0 2019-12-11 14:32:37 UTC+0000&lt;br&gt;
0xfffffa80022199e0 svchost.exe 2368 484 9 365 0 0 2019-12-11 14:32:51 UTC+0000&lt;br&gt;
0xfffffa8002222780 cmd.exe 1984 604 1 21 1 0 2019-12-11 14:34:54 UTC+0000&lt;br&gt;
0xfffffa8002227140 conhost.exe 2692 368 2 50 1 0 2019-12-11 14:34:54 UTC+0000&lt;br&gt;
0xfffffa80022bab30 mspaint.exe 2424 604 6 128 1 0 2019-12-11 14:35:14 UTC+0000&lt;br&gt;
0xfffffa8000eac770 svchost.exe 2660 484 6 100 0 0 2019-12-11 14:35:14 UTC+0000&lt;br&gt;
0xfffffa8001e68060 csrss.exe 2760 2680 7 172 2 0 2019-12-11 14:37:05 UTC+0000&lt;br&gt;
0xfffffa8000ecbb30 winlogon.exe 2808 2680 4 119 2 0 2019-12-11 14:37:05 UTC+0000&lt;br&gt;
0xfffffa8000f3aab0 taskhost.exe 2908 484 9 158 2 0 2019-12-11 14:37:13 UTC+0000&lt;br&gt;
0xfffffa8000f4db30 dwm.exe 3004 852 5 72 2 0 2019-12-11 14:37:14 UTC+0000&lt;br&gt;
0xfffffa8000f4c670 explorer.exe 2504 3000 34 825 2 0 2019-12-11 14:37:14 UTC+0000&lt;br&gt;
0xfffffa8000f9a4e0 VBoxTray.exe 2304 2504 14 144 2 0 2019-12-11 14:37:14 UTC+0000&lt;br&gt;
0xfffffa8000fff630 SearchProtocol 2524 480 7 226 2 0 2019-12-11 14:37:21 UTC+0000&lt;br&gt;
0xfffffa8000ecea60 SearchFilterHo 1720 480 5 90 0 0 2019-12-11 14:37:21 UTC+0000&lt;br&gt;
0xfffffa8001010b30 WinRAR.exe 1512 2504 6 207 2 0 2019-12-11 14:37:23 UTC+0000&lt;br&gt;
0xfffffa8001020b30 SearchProtocol 2868 480 8 279 0 0 2019-12-11 14:37:23 UTC+0000&lt;br&gt;
0xfffffa8001048060 DumpIt.exe 796 604 2 45 1 1 2019-12-11 14:37:54 UTC+0000&lt;br&gt;
0xfffffa800104a780 conhost.exe 2260 368 2 50 1 0 2019-12-11 14:37:54 UTC+0000&lt;br&gt;
STEP 5: SHOW HIDDEN AND/OR UNLINKED PROCESSES Show hidden(injected) and or unlinked processes, an example on our CTF:&lt;/p&gt;

&lt;p&gt;volatility -f MemoryDump_Lab1.raw --profile=Win7SP1x64 pstree&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;Name Pid PPid Thds Hnds Time&lt;/p&gt;

&lt;p&gt;0xfffffa8000f4c670:explorer.exe 2504 3000 34 825 2019-12-11 14:37:14 UTC+0000 . 0xfffffa8000f9a4e0:VBoxTray.exe 2304 2504 14 144 2019-12-11 14:37:14 UTC+0000 . 0xfffffa8001010b30:WinRAR.exe 1512 2504 6 207 2019-12-11 14:37:23 UTC+0000 0xfffffa8001c5f630:wininit.exe 424 312 3 75 2019-12-11 13:41:34 UTC+0000 . 0xfffffa8001c98530:services.exe 484 424 13 219 2019-12-11 13:41:35 UTC+0000 .. 0xfffffa8002170630:wmpnetwk.exe 1856 484 16 451 2019-12-11 14:16:08 UTC+0000 .. 0xfffffa8001f91b30:TCPSVCS.EXE 1416 484 4 97 2019-12-11 13:41:55 UTC+0000 .. 0xfffffa8001da96c0:svchost.exe 876 484 32 941 2019-12-11 13:41:43 UTC+0000 .. 0xfffffa8001d327c0:VBoxService.ex 652 484 13 137 2019-12-11 13:41:40 UTC+0000 .. 0xfffffa8000eac770:svchost.exe 2660 484 6 100 2019-12-11 14:35:14 UTC+0000 .. 0xfffffa80022199e0:svchost.exe 2368 484 9 365 2019-12-11 14:32:51 UTC+0000 .. 0xfffffa8001e50b30:svchost.exe 1044 484 14 366 2019-12-11 13:41:48 UTC+0000 .. 0xfffffa8001d8c420:svchost.exe 816 484 23 569 2019-12-11 13:41:42 UTC+0000 ... 0xfffffa80021da060:audiodg.exe 2064 816 6 131 2019-12-11 14:32:37 UTC+0000 .. 0xfffffa8001c38580:svchost.exe 948 484 13 322 2019-12-11 14:16:07 UTC+0000 .. 0xfffffa8001eba230:spoolsv.exe 1208 484 13 282 2019-12-11 13:41:51 UTC+0000 .. 0xfffffa8001d376f0:SearchIndexer. 480 484 14 701 2019-12-11 14:16:09 UTC+0000 ... 0xfffffa8000fff630:SearchProtocol 2524 480 7 226 2019-12-11 14:37:21 UTC+0000 ... 0xfffffa8001020b30:SearchProtocol 2868 480 8 279 2019-12-11 14:37:23 UTC+0000 ... 0xfffffa8000ecea60:SearchFilterHo 1720 480 5 90 2019-12-11 14:37:21 UTC+0000 .. 0xfffffa8000f3aab0:taskhost.exe 2908 484 9 158 2019-12-11 14:37:13 UTC+0000 .. 0xfffffa8001cf4b30:svchost.exe 588 484 11 358 2019-12-11 13:41:39 UTC+0000 .. 0xfffffa8001d49b30:svchost.exe 720 484 8 279 2019-12-11 13:41:41 UTC+0000 .. 0xfffffa8001da5b30:svchost.exe 852 484 28 542 2019-12-11 13:41:43 UTC+0000 ... 0xfffffa8000f4db30:dwm.exe 3004 852 5 72 2019-12-11 14:37:14 UTC+0000 ... 0xfffffa8001dfa910:dwm.exe 1988 852 5 72 2019-12-11 14:32:25 UTC+0000 .. 0xfffffa8001e1bb30:svchost.exe 472 484 19 476 2019-12-11 13:41:47 UTC+0000 .. 0xfffffa8000d3c400:sppsvc.exe 1508 484 4 141 2019-12-11 14:16:06 UTC+0000 .. 0xfffffa8001f58890:svchost.exe 1372 484 22 295 2019-12-11 13:41:54 UTC+0000 .. 0xfffffa8001eda060:svchost.exe 1248 484 19 313 2019-12-11 13:41:52 UTC+0000 .. 0xfffffa8001eb47f0:taskhost.exe 296 484 8 151 2019-12-11 14:32:24 UTC+0000 . 0xfffffa8001ca0580:lsass.exe 492 424 9 764 2019-12-11 13:41:35 UTC+0000 . 0xfffffa8001ca4b30:lsm.exe 500 424 11 185 2019-12-11 13:41:35 UTC+0000 0xfffffa800154f740:csrss.exe 320 312 9 457 2019-12-11 13:41:32 UTC+0000 0xfffffa8000ca0040:System 4 0 80 570 2019-12-11 13:41:25 UTC+0000 . 0xfffffa800148f040:smss.exe 248 4 3 37 2019-12-11 13:41:25 UTC+0000 .. 0xfffffa8001c45060:psxss.exe 376 248 18 786 2019-12-11 13:41:33 UTC+0000 0xfffffa8001c5f060:winlogon.exe 416 360 4 118 2019-12-11 13:41:34 UTC+0000 0xfffffa8000ca81e0:csrss.exe 368 360 7 199 2019-12-11 13:41:33 UTC+0000 . 0xfffffa8002227140:conhost.exe 2692 368 2 50 2019-12-11 14:34:54 UTC+0000 . 0xfffffa800104a780:conhost.exe 2260 368 2 50 2019-12-11 14:37:54 UTC+0000 0xfffffa8002046960:explorer.exe 604 2016 33 927 2019-12-11 14:32:25 UTC+0000 . 0xfffffa80021c75d0:VBoxTray.exe 1844 604 11 140 2019-12-11 14:32:35 UTC+0000 . 0xfffffa8002222780:cmd.exe 1984 604 1 21 2019-12-11 14:34:54 UTC+0000 . 0xfffffa80022bab30:mspaint.exe 2424 604 6 128 2019-12-11 14:35:14 UTC+0000 . 0xfffffa8001048060:DumpIt.exe 796 604 2 45 2019-12-11 14:37:54 UTC+0000 0xfffffa8001e68060:csrss.exe 2760 2680 7 172 2019-12-11 14:37:05 UTC+0000 0xfffffa8000ecbb30:winlogon.exe 2808 2680 4 119 2019-12-11 14:37:05 UTC+0000 So what stands out: (most are system apps/services) so we ignore them, I suspect DumpIT.exe is not relevant for now (might be a dumping tool for the memory) but this will be last for me to run and check ...&lt;/p&gt;

&lt;p&gt;cmd.exe PID 1984&lt;/p&gt;

&lt;p&gt;mpsaint.exe PID 2424&lt;/p&gt;

&lt;p&gt;Winrar.exe PID 1512&lt;/p&gt;

&lt;p&gt;Now let's see what command launched this apps in question.&lt;br&gt;
**&lt;br&gt;
STEP 6: INVESTIGATE COMMANDS THAT LAUNCHED APPLICATIONS We use the PIDs from which we suspect the process seems to have been initiated:**&lt;/p&gt;

&lt;p&gt;_volatility -f MemoryDump_Lab1.raw --_profile=Win7SP1x64 cmdline -p 1984,2424,1512 Output:&lt;/p&gt;

&lt;p&gt;_Volatility Foundation Volatility Framework 2._6&lt;/p&gt;

&lt;p&gt;cmd.exe pid: 1984 Command line : "C:\Windows\system32\cmd.exe"&lt;/p&gt;

&lt;p&gt;mspaint.exe pid: 2424 Command line : "C:\Windows\system32\mspaint.exe"&lt;/p&gt;

&lt;p&gt;WinRAR.exe pid: 1512 Command line : "C:\Program Files\WinRAR\WinRAR.exe" "C:\Users\Alissa Simpson\Documents\Important.rar" Trying with console:&lt;/p&gt;

&lt;p&gt;volatility -f MemoryDump_Lab1.raw --profile=Win7SP1x64 consoles&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Volatility Foundation Volatility Framework 2&lt;/em&gt;.6&lt;/p&gt;

&lt;p&gt;ConsoleProcess: conhost.exe Pid: 2692 Console: 0xff756200 CommandHistorySize: 50 HistoryBufferCount: 1 HistoryBufferMax: 4 OriginalTitle: %SystemRoot%\system32\cmd.exe Title: C:\Windows\system32\cmd.exe - St4G3$1 AttachedProcess: cmd.exe Pid: 1984 Handle: 0x60&lt;br&gt;
CommandHistory: 0x1fe9c0 Application: cmd.exe Flags: Allocated, Reset CommandCount: 1 LastAdded: 0 LastDisplayed: 0 FirstCommand: 0 CommandCountMax: 50 ProcessHandle: 0x60 Cmd #0 at 0x1de3c0: St4G3$1&lt;br&gt;
Screen 0x1e0f70 X:80 Y:300 Dump: Microsoft Windows [Version 6&lt;/p&gt;

&lt;p&gt;follow me on twitter&lt;br&gt;
&lt;a href="https://twitter.com/noahparagon"&gt;https://twitter.com/noahparagon&lt;/a&gt;&lt;/p&gt;

</description>
      <category>volattilty</category>
      <category>cyberranges</category>
      <category>malware</category>
    </item>
    <item>
      <title>hackerrank algorithms solution</title>
      <dc:creator>Noah Mugaya</dc:creator>
      <pubDate>Sat, 18 Jun 2022 09:47:12 +0000</pubDate>
      <link>https://dev.to/paragonnoah/hackerrank-algorithms-solution-4n2k</link>
      <guid>https://dev.to/paragonnoah/hackerrank-algorithms-solution-4n2k</guid>
      <description>&lt;p&gt;Given an array of integers, find the sum of its elements.&lt;br&gt;
for example &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;if the array, arr = [1, 2, 3], 1+2+3 so return 6&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  function discription
&lt;/h2&gt;

&lt;p&gt;_Complete the simpleArraySum function in the editor below. It must return the sum of the array elements as an integer.&lt;/p&gt;

&lt;p&gt;simpleArraySum has the following parameter(s):&lt;/p&gt;

&lt;p&gt;ar: an array of integers&lt;/p&gt;

&lt;h2&gt;
  
  
  input format
&lt;/h2&gt;

&lt;p&gt;The first line contains an integer,n , denoting the size of the array.&lt;br&gt;
The second line contains  space-separated integers representing the array's element&lt;br&gt;
_&lt;/p&gt;

&lt;h2&gt;
  
  
  solutions
&lt;/h2&gt;

&lt;p&gt;// bin/python3&lt;br&gt;
import math&lt;br&gt;
import os&lt;br&gt;
import random&lt;br&gt;
import re&lt;br&gt;
import sys&lt;/p&gt;

&lt;h1&gt;
  
  
  we define a function to return an interger
&lt;/h1&gt;

&lt;p&gt;def simpleArraySum(ar):&lt;br&gt;
    # Write your code here&lt;br&gt;
    x=0&lt;br&gt;
    for i in range(0,ar_count):&lt;br&gt;
        x += ar[i]&lt;br&gt;
    return x&lt;br&gt;
if &lt;strong&gt;name&lt;/strong&gt; == '&lt;strong&gt;main&lt;/strong&gt;':&lt;br&gt;
    fptr = open(os.environ['OUTPUT_PATH'], 'w')&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ar_count = int(input().strip())

ar = list(map(int, input().rstrip().split()))

result = simpleArraySum(ar)

fptr.write(str(result) + '\n')

fptr.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>datastructure</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>hackerrank algorithns solutions</title>
      <dc:creator>Noah Mugaya</dc:creator>
      <pubDate>Thu, 16 Jun 2022 15:03:13 +0000</pubDate>
      <link>https://dev.to/paragonnoah/hackerrank-algorithns-solutions-3l2l</link>
      <guid>https://dev.to/paragonnoah/hackerrank-algorithns-solutions-3l2l</guid>
      <description>&lt;p&gt;Given an array of integers, find the sum of its elements.&lt;/p&gt;

&lt;p&gt;For example, if the array ,ar[1, 2, 3] ,(1+2+3) so return = 6&lt;br&gt;
here`s is my sample code&lt;/p&gt;

&lt;h1&gt;
  
  
  Complete the 'simpleArraySum' function below.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  The function is expected to return an INTEGER.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  The function accepts INTEGER_ARRAY ar as parameter.
&lt;/h1&gt;

&lt;p&gt;import math&lt;br&gt;
import os&lt;br&gt;
import random&lt;br&gt;
import re&lt;br&gt;
import sys&lt;/p&gt;

&lt;p&gt;def simpleArraySum(ar):&lt;br&gt;
    # Write your code here&lt;br&gt;
    x=0&lt;br&gt;
    for i in range(0,ar_count):&lt;br&gt;
        x += ar[i]&lt;br&gt;
    return x&lt;/p&gt;

&lt;p&gt;if &lt;strong&gt;name&lt;/strong&gt; == '&lt;strong&gt;main&lt;/strong&gt;':&lt;br&gt;
    fptr = open(os.environ['OUTPUT_PATH'], 'w')&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ar_count = int(input().strip())

ar = list(map(int, input().rstrip().split()))

result = simpleArraySum(ar)

fptr.write(str(result) + '\n')

fptr.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>python</category>
    </item>
  </channel>
</rss>
