<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>of Application Security Testing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abdul Razaque</string-name>
          <email>a.razaque@edu.iitu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Saule Amanzholova</string-name>
          <email>s.amanzholova@iitu.edu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amir Akimbayev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Emil Kovalenko</string-name>
          <email>kovv.emil@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dilnaz</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ashimzhanova</string-name>
          <email>ashimzhanova00@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>International Information Technology University</institution>
          ,
          <addr-line>Manas St. 34/1, Almaty, 050040</addr-line>
          ,
          <country country="KZ">Kazakhstan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The main objective of the scientific work was to use theoretical and practical knowledge gained during studying at the university, as well as their further application in the development of a scientific work on the system of application security testing - AST. Various statistical data were collected on which products of this type are present on the world market, as well as on the market of Kazakhstan, analysis of the security of banks' web resources, and much more. Also, to achieve this goal, available resources associated with the algorithms of the work of statistical and dynamic analysis were studied, as well as piloting similar products from foreign vendors, which are activelyused in Kazakhstan banks. In this work, libraries and tools such as Django, Libsast, Bandit, Semgrep, and other dependencies were used. During the scientific work, a corporate-level web application was developed that scans and analyzes the repository of the downloaded application to further display statistics and a summary of the vulnerabilities found, as well as methods for solvingthem in a single JSON format. This scientific work is aimed at implementation in the banks of the Republic of Kazakhstan and its use by security departments and code review.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The relevance. The entry level of attackers is the application. Each application has vulnerabilityin
cases that we are currently observed. Companies waste money on ineffective Pentest audits, which
aren't effective, against which they order a system that can find and resolve all vulnerabilities. Even the
largest companies have poor quality and security of source code [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>The scientific novelty. The existing approaches through the use of manual auditing are too
outdated, but the approach of Static Code AST is the most modern way to do this. This product will
adhere to modern application security standards, as well as be able to flexibly customize the
functionality for the task set by the company and the platform on which this product will be used, and
integration tools. There are only a few vendors offer tools for static code analysis tools. It’s easy to
implement, to add a static scanner to your development pipeline and provide feedback on a potential
problem.</p>
      <p>The prepared scientific work from our team is aimed at testing application security, but we don'twant
to limit ourselves to SAST, or other AST. We want to present a product near to ASTO - Application
security testing orchestration. Main goal of this scientific work is to provide a comprehensive
Proceedings of the 7th International Conference on Digital Technologies in Education, Science and Industry (DTESI 2022), October 20-21,</p>
      <p>
        2022 Copyright for this paper by its authors.
protection by scanning applications for vulnerabilities, starting from static scanning, and ending with
other types of scanning. Integration with software development life cycle gives neededefficiency of
product, it also includes analytics of the scans.[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] Process of testing code will be delegated by modules
starting from SAST - static scanning codeon vulnerabilities by white box testing, source code will be
scanned by parsers, and scanners. SAST, it's a very old and stable type of scan, it takes responsibility
for undeclared possibilities. Our SAST willemploy predetermined rules, such as coding errors in the
source code that must be corrected. Idea of SAST is to scan but not to start or run it. Use of
opensource vulnerabilities databases will increase efficiency, and time by time, for example if some critical
vulnerability will born into world, and start toinfect all computers, our solution will send update to
servers to find and destroy this type of vulnerabilities, or use WAF, IDS, IPS system to close this
gateway before vulnerability can be used tohack to system, so it’s update, upgrade and control system
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>At the final stage a system engine will be used that will work by list of vulnerabilities to find false
positives and delegate them. It will be very useful for security officers who have not so much timeto
look at each vulnerability every time.</p>
      <p>
        Profit of a scientific work product that is not framed by method of scanning application, will give
effort in Kazakhstan, and worldwide against other big solutions in the market. Against comparisonof
other product, it will have more efficiency and more possibilities to defense scientific work by the fact
that it’s complex solution that customer can buy and be sure about security safety of applications [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>3. Technical implementation</title>
      <p>
        In addition to the main Django library, also used two libraries for the regex-based pattern matching
- Libsast and Bandit. To implement the semantic analysis, the Semgrep libraries were used, which can
only be used in the Linux environment[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. For them, self-written various rules were independently
written that meet the standards of modern actual vulnerabilities such as Log4J, NPM, etc.
      </p>
      <p>In order to ensure the smooth operation of users from the very beginning, it was necessary to design
the login screen as intuitively as possible. This screen is usually the first step for the user when getting
acquainted with the product, moreover, security is important when authenticating users.</p>
      <p>
        The user interface has been designed to be user-friendly. The initial login page uses two-factor
authentication and without the possibility of registration (determined by internal security protection
purposes) in this case, using the product license, a regulated number of accesses is issued. The 2FA
application of Google Code Authenticator works perfectly and it correctly uses the reading of the
generated tokens corresponding to the generation on the server. In the case of corporate product
development, there is a field input check, which will give the user, first of all, a convenient start with
the platform [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        The EternalSec user interface looks and works as familiar to most users. The navigation step
structure on the left makes it easier to move inside the platform, for a more user-friendly functionality,
the ability to switch to dark-mode has been developed[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The top panel displays information about
the workspace or task selected in the left panel. Multiple users can simultaneously access the user
interface through web browsers. In the same system-wide database, users have access to the same
informationdetails. The permissions provided to each user control access to tasks and objects.
      </p>
      <p>The home page can save the mode that the user prefers in a session variable. The view switchesthe
mode that the user wants to use - in turn, the binding tag references this view to switch the css mode.
Saving the user's theme in localStorage and every time the page loads, js-code is launched, which sets
the css of the user's choice. To use the default theme, the information is stored in cookies and allows</p>
      <sec id="sec-2-1">
        <title>Django to deliver pages with the right theme instead of relying on js speed [8]. The Analytics section allows you to see basic statistics for all scans and compare the results ofthe analysis of the most common vulnerabilities.</title>
        <p>1. See the list — the most recent five scans are displayed, followed by a link to the Scans page,
which contains the full list of scans;
2. View statistics of the number of scans, taking statuses of the average value for all past scans;
3. The number of vulnerabilities (taking into account the level of criticality);
4. View the load while scanning web applications to account for half connections in case of
afailure.</p>
        <p>The Overview page provides the following information:
• Scan duration;
• Repository diagram in the form of a hierarchical tree;
• A diagram with the number of vulnerabilities of each level of criticality in the scan;
• Navigation menu.</p>
        <p>
          The vulnerabilities tab contains extended information about them, including default parameters
(CWE, id, description, severity), classifications as links to relevant items in CWE, HIPAA, FSTEC
database, OWASP, CWE/SANS Top 25, PCI DSS, taking into account the output onthe right side of
the processed file [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>
          The report page allows the user to upload data in the most readable form(.json), it was also taken
into account that most often the internal security structure uses files of this type to select themin SIEM
systems and scan signatures with machine code [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>The about section provides a timeline and general information about the beginning of product
development, and planned updates, so the user is always aware of the current status of the product.</p>
        <p>ASTO starts SAST scan by request of the user from the web interface. Users send source codeof file
in ZIP, RAR format, with other information, for example, name, link to a git repository.</p>
        <p>As a server, it takes this source code zip and adds it to our database field - “FileField”, and creates a
new repository, with a new scan. The status function here needs to track the status of scanning to show
it to the user interface. Using zip libraries, it unpacks the src path to see the sourcecode in the needed
format.</p>
        <p>
          By using thread function, the application can do scanning function in the thread with the daemon,
the process of scanning is in parallel, it needs technical requirements for that, but it gives the best
efficiency of the functionality [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. Libraries that helped to build the scanner were: Bandit, Libsast,
Semgrep, JSON.
        </p>
        <p>
          Libsast library uses a pattern matcher to find vulnerabilities, this helps to scan any source code
language and to increase functionality it uses python regex rule patterns to create custom patterns [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
Manypopular scanners nowadays are based on the libsast library, for instance, njsscan, MobSF, etc.
Results of libsast are based on a regex test of the given source code, it shows match lines, position, file
path andresults can be fully customized by different options. It uses JSON format to output findings.
        </p>
        <p>Bandit library finds security vulnerabilities only in Python code, but it can be modified to increase
the number of supported languages. Using the os system package helps to start a scan and track the
process, and check the conditions that you should pay attention to. Results of bandit are based on a test
of abstract syntax trees of given source code, it shows match lines, position, file path, level of confidence
and severity, etc. It uses JSON format to output findings. Users see results by webinterface in section
vulnerabilities, and source code in the right grid with a window of code. Using section reports, users or
analysts can download reports by format JSON from the response of request with the name of the scan
in name of the file.</p>
        <p>Parser eternalsec_json was developed to use results from libraries in the product, and to add new
features.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Vulnerability structure is shown in Figure 13. It is based on python dictionaries.</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. Conclusion</title>
      <p>In conclusion, to summarize the development of the ASTO scientific work, a web-based
information system, and functions were created that will scan applications for information security,
show how to solve issues and vulnerabilities, and determine the level and criticality of the application
and be complex to customers.</p>
      <p>In the technical part, a lot of work has been done to develop this product, various frameworks have
been used like Django, tools like various packages, and libraries like libsast, bandit, and semgrep. More
than 2-3 thousand lines of code have been written. Own rules for static and semantic analysis were
written without being tied to a specific programming language, which makes this product
crossplatform and allows it to be deployed both on Windows and Linux. The web interface also complies
with all modern UI/UX design standards, providing a pleasant user experience and rich functionality.
Existing resources have been extended by adding the necessary checks for their functionality.</p>
      <p>This enterprise-level product is recommended for use in security departments of banks, regulators,
as well as in integrator companies and software developers. Since this product is a modular orchestrator,
it will be easy to customize it to the needs of the company, as well as integrate it into any stage of the
development process.</p>
      <p>As a result, we have a product that has assembled all the necessary things to ensure the information
security of an application, and which economic efficiency is very positive. In the future, this product
can compete with the current market leaders.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1] URL: https://www.vaadata.com/blog/pentest-statistics-and
          <article-title>-most-frequent-vulnerabilities/.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Ranking</surname>
          </string-name>
          .kz, Information security incident statistics,
          <year>January 2021</year>
          . URL: http://ranking.kz/ru/a/infopovody/kolichestvo-kiberatak
          <article-title>-v-kazahstane-uvelichilos-pochti-v-3- raza-do- 3-tysyach-incidentov-90-iz-nih-prihoditsya-na-botnety.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Imperva</surname>
          </string-name>
          , Application Security Testing,
          <year>2021</year>
          . URL: https://www.imperva.com/learn/applicationsecurity/application-securitytesting/#:~:text=
          <source>Application%20security%20testing%20(AST)%20is,started%20as%20a%20ma nual%20process.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Garbajosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <source>Myths and Facts About Static Application Security Testing Tools: An Action Research at Telenor Digital</source>
          (
          <year>2018</year>
          )
          <fpage>24</fpage>
          -
          <lpage>48</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P.</given-names>
            <surname>Johnson</surname>
          </string-name>
          , What You Need To Know
          <source>About Application Security Testing Orchestration, December</source>
          <volume>10</volume>
          ,
          <year>2020</year>
          . URL: https://www.mend.io/resources/blog/asto-application
          <string-name>
            <surname>-</surname>
          </string-name>
          security-testingorchestration/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Nabe</surname>
          </string-name>
          ,
          <source>Impact of COVID-19 on Cybersecurity</source>
          ,
          <year>2021</year>
          . URL: https://www2.deloitte.com/ch/en/pages/risk/articles/impact-covid-cybersecurity.html.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>PT</given-names>
            <surname>Application</surname>
          </string-name>
          <article-title>Inspector, official description</article-title>
          . URL: https://www.ptsecurity.com/ruru/products/ai/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>[8] SonarQube, official description</article-title>
          . URL: https://www.sonarqube.org/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>[9] Solar appScreener, official description</article-title>
          . URL: https://rt-solar.ru/products/solar_appscreener/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <article-title>HCL AppScan, official description</article-title>
          . URL: https://www.hcltech.com/brochures/software/hclappscan-standard.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <article-title>Profit.kz, The number of cyberattacks in the Republic of Kazakhstan increased by 20% over the year, 8 July 2021</article-title>
          . URL: https://profit.kz/news/61600/Kolichestvo-kiberatak
          <article-title>-v-RK-viroslo-</article-title>
          <string-name>
            <surname>na-</surname>
          </string-name>
          20
          <string-name>
            <surname>-</surname>
          </string-name>
          za-god/.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>ZAO</given-names>
            <surname>Deloitte &amp; Touche</surname>
          </string-name>
          <string-name>
            <surname>CIS</surname>
          </string-name>
          ,
          <article-title>Cyber risk assessment in banks of Kazakhstan by Deloitte on forum “Making an Impact That Matters</article-title>
          ,
          <year>June 2021</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>