<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by volkan erdem on Medium]]></title>
        <description><![CDATA[Stories by volkan erdem on Medium]]></description>
        <link>https://medium.com/@vlknerdem?source=rss-fe33da4268ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LLihUmkqSA5lxiPTy5c8Jw.jpeg</url>
            <title>Stories by volkan erdem on Medium</title>
            <link>https://medium.com/@vlknerdem?source=rss-fe33da4268ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:34:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vlknerdem/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MACBOOK LOGLARININ TOPLANMASI]]></title>
            <link>https://medium.com/vk-ar-ge/macbook-loglarinin-toplanmasi-6788e5a5da52?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/6788e5a5da52</guid>
            <category><![CDATA[macbook]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[genel]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 08:39:40 GMT</pubDate>
            <atom:updated>2024-12-02T06:38:24.846Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vw7rBNndBkfb34i9OPTFow.jpeg" /><figcaption>MacOSX</figcaption></figure><p>Siber güvenlik alanında saldırı tespiti ve analizi için bilgisayar kayıtlarının toplanması hayati önem taşımaktadır. Kurumlarda bu konuda altyapılarında bulunan sunucu ve cihazlardan gerekli kayıtları merkezi log uygulaması ya da <strong>SIEM </strong>güvenlik ürününe toplayarak sağlamaktadır.</p><p>Altyapıda kullanılan sunucu ve cihazlar gereksinimlere göre farklı işletim sistemlerinde olabilirler. Kurumlar genellikle altyapılarında Microsoft Windows işletim sistemlerini yaygın olarak kullanmaktadır ama günümüzde artan farklı iş model ve gereksinimlerinden dolayı farklı işletim sistemlerinde cihazlar kullanmaktadır. Bunların başında da Unix ve Macos gelmektedir.</p><p>Macos işletim sistemlerinde logların takip edilmesi kurumun altyapısında bulunan diğer cihazlar kadar öneme sahiptir. Macos cihaz loglarını Unix cihazlar gibi syslog olarak SIEM’e toplanabilir. Ama bu Unix sistemler dışında bazı ön gereksinimler bulunmaktadır. Bu gereksinimlerin içerisinde syslog gönderecek dosyanın düzenlenmesi ve cihaz üzerinde çalıştırılacak Deamon’ın ayar dosyası bulunmaktadır. Macos loglarını SIEM’de toplamak için gerekli olan ön gereksinim için aşağıdaki 3 dosyaya ihtiyacımız bulunmaktadır.</p><ul><li>Syslog kütüphanesi için <strong>logStream.pl</strong></li><li>Syslog göndermek için gerekli olan script</li><li>Gerekli ajanın yapılandırma dosyası</li></ul><p><em>**Syslog göndermek için logStream.pl kullanılmaktadır. Gerekli dokümanı IBM’in Fix Central sitesinden indirilebilinir.</em></p><p>**<em>Çalışma içerisinde terminal ekranı üzerinde yapılan tüm çalışmalar root kullanıcısıyla yapılacağı için root kullanıcısı seviyesine yetkilendirilmelidir.</em></p><h3><strong>Syslog için gerekli script</strong></h3><p>Logları syslog gönderebilmek için “<strong>logStreamScript.sh</strong>” isminde bir dosya oluşturulur. Oluşturulan bu dosyanın içerisine aşağıdaki script eklenir.</p><pre>#!/bin/sh<br>/Library/Scripts/logStream.pl -H &lt;SIEM IP Adresi&gt;</pre><p>Oluşturulan bu dosyaya terminal ekranında aşağıdaki komut kullanılarak çalışma yetkisi tanımlanır.</p><pre> chmod +x logStreamScript.sh</pre><p>Çalışma yetkisine sahip bu dosya aşağıdaki komut yardımıyla /Library/Scripts dizinin içerisine kopyalanır.</p><pre>cp /&lt;dosyanın bulunduğu dizi&gt;/logStreamScripts.sh /Library/Scripts</pre><h3><strong>Ajanın yapılandırma dosyası</strong></h3><blockquote>Macos işletim sistemi içerisinde logların syslog olarak düzenli bir şekilde gönderilmesi için ajan oluşturulması gerekmektedir.</blockquote><p>Ajanın yapılandırma dosyasını hazırlamak için “com.logSource.app.plist” isminde bir dosya oluşturulmalıdır.</p><p>Oluşturulan bu dosyanın içerisine aşağıdaki script eklenmelidir.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;<br>&lt;plist version=&quot;1.0&quot;&gt;<br> &lt;dict&gt;<br>  &lt;key&gt;Label&lt;/key&gt;<br>  &lt;string&gt;com.logSource.app&lt;/string&gt;<br>  &lt;key&gt;ProgramArguments&lt;/key&gt;<br>  &lt;array&gt;<br>   &lt;string&gt;/bin/sh&lt;/string&gt;<br>   &lt;string&gt;/Library/Scripts/logStreamScript.sh&lt;/string&gt;<br>  &lt;/array&gt;<br>      &lt;key&gt;RunAtLoad&lt;/key&gt;<br>      &lt;true/&gt;<br> &lt;/dict&gt;<br>&lt;/plist&gt;</pre><p><em>*** Hazırlanan plist dosyasında ki “label” benzersiz olmalıdır.</em></p><p><em>*** Program Arguments” syslog göndermek için hazırlanan logStreamScript.sh dosyasını full path olarak göstermelidir.</em></p><p><em>*** “RunAtLoad” anahtarı ile otomatik çalıştırmayı sağlamaktadır.</em></p><pre>chmod +x com.logSource.app.plist</pre><blockquote><strong>macOS’ta </strong>plist dosyaları, genellikle belirli görevleri otomatik başlatmak, süreçleri yönetmek veya belirli bir zamanlamaya göre çalıştırmak amacıyla kullanılır. Bu dosyalar farklı dizinlerde saklanarak hangi kullanıcı veya sistem seviyesinde çalışacakları belirlenir.</blockquote><p><strong><em>· </em></strong><strong><em>~/Library/LaunchAgents</em></strong><em>: Bu dizin, yalnızca mevcut kullanıcı için geçerlidir. Buradaki </em><em>plist dosyaları, yalnızca o kullanıcı oturum açtığında çalıştırılır. Diğer kullanıcı oturumlarını etkilemez ve her kullanıcının kendi </em><em>~/Library/LaunchAgents klasörü vardır.</em></p><p><em>· </em><strong><em>/Library/LaunchAgents</em></strong><em>: Bu dizindeki </em><em>plist dosyaları, tüm kullanıcılar için geçerlidir. Herhangi bir kullanıcı oturum açtığında çalıştırılır. Ancak sistem başlangıcında çalışmaz; yani, yalnızca kullanıcı oturumu açıldıktan sonra başlatılır.</em></p><p><em>· </em><strong><em>/Library/LaunchDaemons</em></strong><em>: Bu dizin, sistem genelinde hizmetleri tanımlamak içindir ve sistemin açılışında otomatik olarak başlatılır. Kullanıcı oturumu açılmamış olsa bile çalışır. Sistem yönetimi veya arka plan hizmetleri için ideal konumdur.</em></p><p><em>· </em><strong><em>/System/Library/LaunchAgents</em></strong><em>: Bu dizin, Apple tarafından sağlanan ve kullanıcı oturumu açıldığında otomatik başlatılan sistem seviyesindeki </em><em>LaunchAgent dosyalarını içerir. Genellikle kullanıcı tarafından düzenlenmesi önerilmez, çünkü macOS güncellemeleriyle değişebilir ve hatalara yol açabilir.</em></p><p><strong><em>/System/Library/LaunchDaemons</em></strong><em>: Bu dizin, Apple tarafından sağlanan ve sistemin başlangıcında otomatik olarak başlatılan </em><em>LaunchDaemon dosyalarını içerir. Bu dosyalar, kullanıcı oturumuna bağlı olmaksızın çalışan çekirdek sistem hizmetleri içindir. Apple&#39;ın işletim sistemi için kritik olduğundan bu dizinde değişiklik yapmak önerilmez.</em></p><blockquote>Oturumdan bağımsız ve otomatik bi şekilde çalışması için <strong>/Library/LaunchDaemons </strong>dizinine kopyalıyoruz.</blockquote><p>Çalışma yetkisine sahip bu dosya aşağıdaki komut yardımıyla <strong>/Library/LaunchDaemons</strong> dizinin içerisine kopyalanır.</p><pre>cp /&lt;dosyanın bulunduğu dizin&gt;/com.logSource.app.plist /Library/LaunchDaemons</pre><p><strong>Dosyalarımız hazır artık ajanı çalıştırıp logları SIEM’e alabiliriz.</strong></p><pre>launchctl load /Library/LaunchDaemons/com.logSource.app.plist</pre><p>SIEM üzerinden logları kontrol edebilirsiniz.</p><h3><strong>REFERANSLAR</strong></h3><p><a href="https://www.ibm.com/docs/en/dsm?topic=x-configuring-syslog-your-apple-mac-os#t_dsm_guide_mac_cfg_syslog">https://www.ibm.com/docs/en/dsm?topic=x-configuring-syslog-your-apple-mac-os#t_dsm_guide_mac_cfg_syslog</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6788e5a5da52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vk-ar-ge/macbook-loglarinin-toplanmasi-6788e5a5da52">MACBOOK LOGLARININ TOPLANMASI</a> was originally published in <a href="https://medium.com/vk-ar-ge">Vakıf Katılım Ar-Ge Merkezi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Namespace In QRadar]]></title>
            <link>https://medium.com/@vlknerdem/namespace-in-qradar-5e71aaa8b914?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e71aaa8b914</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[qradar]]></category>
            <category><![CDATA[aql]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 13:53:59 GMT</pubDate>
            <atom:updated>2024-06-13T13:53:59.413Z</atom:updated>
            <content:encoded><![CDATA[<p>IBM Qradar is one of the most powerful SIEM solution that allows for data querying and analysis AQL ( Advanced Query Language). There are various namespaces for data analysis. We focus on namespace on QRadar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*LCE_mKJIPjpkXVVok1mkMA.png" /></figure><p>Namespaces are a feature of QRadar’s AQL (Advanced Query Language). QRadar’s AQL supports various functions and operators that make queries more powerful and flexible. These namespaces contain functions that are optimized to perform specific tasks or process specific types of data.</p><p>There are lots of different namespace for different type of function and filters. ‘<strong>filters::’ , ‘util::’ , ‘lookup::’ , ‘geo::’ and ‘event::’ </strong>are the most known filters for AQL.</p><p>Lets explain by sample queries.</p><h3>Filters::</h3><p>The filters:: namespace in QRadar provides various functions to filter specific data types and fields. In this article, we will explore some key functions in the filters:: namespace and their usage examples.</p><ul><li><strong><em>filters::PScmdFilter(field)</em></strong> : This filter is optimized for analyzing PowerShell commands.</li></ul><pre>SELECT * FROM events WHERE filters::PScmdFilter(&quot;Command&quot;) IMATCHES &#39;(.*StartBitsTransfer.*InvokeItem.*)&#39;</pre><p><em>This query selects all events that contain PowerShell commands in the ‘</em><strong><em>command</em></strong><em>’ field matching a specific regex pattern.</em></p><p>.*StartBitsTransfer.*InvokeItem.*: Matches any command containing &quot;StartBitsTransfer&quot; followed by &quot;InvokeItem&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opCYUeebZWuzJxJghS5lvw.jpeg" /><figcaption>Sample query screen</figcaption></figure><h3>Util::</h3><p>util:: namespace contains various helper functions. These functions are used for date and time operations, text manipulations, and other general helper functions.</p><ul><li><strong><em>util::dateof(startTime)</em></strong> : Returns the date of an event</li><li><strong><em>util::split(sourceIP, ‘.’)</em></strong> : Splits a given area by a given separator.</li><li><strong><em>util::toString(field) </em></strong>: Returns the specified field as a text (string).</li></ul><h3>Lookup::</h3><p>lookup:: The namespace contains functions related to lookup tables. Lookup tables store specific key-value pairs and are used to find these values ​​in queries.</p><ul><li><strong><em>lookup::lookupTable(tableName, key, value)</em></strong> : Looks up key-value pairs in a given lookup table.</li><li><strong><em>lookup::lookupField(tableName, keyField, keyValue, returnField)</em></strong> : Returns the value based on the key field in a given lookup table.</li></ul><h3><strong><em>Geo::</em></strong></h3><p>geo:: namespace contains functions related to geographic location. These functions are used to find the geographic location of IP addresses.</p><ul><li><strong><em>geo::country(ipAddress) : </em></strong>Returns the country of a given IP address.</li><li><strong><em>geo::city(ipAddress) : </em></strong>Returns the city of a given IP address.</li><li><strong><em>geo::distance(sourceip,destinationip)</em></strong> : Calculates the distance between two IP addresses in kilometers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jY3izq_xCe8EOUVMNY78_A.jpeg" /><figcaption>GEO Namespace</figcaption></figure><p><em>This query calculates the distance in kilometers between the source and destination IP addresses for each event.</em></p><ul><li><strong><em>geo::lookup(sourceip)</em></strong> : This query calculates the distance in kilometers between the source and destination domains for each event.</li></ul><h3>Event::</h3><p>event:: It contains various functions related to events. These functions are used to obtain information such as categories and severity levels of events.</p><ul><li><strong><em>event::category(eventCategory)</em></strong> : Returns the name of the event category.</li><li><strong><em>event::severityName(severityID)</em></strong> : Returns the name of the severity level of the event.</li></ul><h3>ADVANTAGES AND DISADVANTAGES</h3><p>QRadar provides numerous powerful functions for filtering various data types and fields. These functions allow you to perform more specific queries when analyzing event data.</p><p><strong><em>Flexibility, Performance, Complexity, Readability and Consistency</em></strong></p><p>There should be different comments about using or not using namespace according to above items. While different namespaces provide advantages, especially for performance, namespaces that enrich data can create extra load on performance.</p><p>However, understanding the advantages and disadvantages of using and not using these namespaces can help you make informed decisions about how to construct your queries to best meet your analytical requirements and performance considerations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e71aaa8b914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nfs Backup From QRadar]]></title>
            <link>https://medium.com/@vlknerdem/nfs-backup-from-qradar-c7327b02d7a7?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7327b02d7a7</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[qradar]]></category>
            <category><![CDATA[backup]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 01:35:28 GMT</pubDate>
            <atom:updated>2024-01-20T01:35:28.367Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, today I will explain how to use nfs backup on QRadar. I think it will help those who want to take nfs backup for SIEM users.</p><p>Before starting NFS backup operations, we need to complete the backup-related configurations. Qradar takes SIEM config backups daily. It also offers the option to take daily backups of data.</p><p>You can determine how long your data will be kept on the system with the Event Retention period. QRadar offers you the opportunity to determine this period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*S8BCdj3lATR3KLK3.png" /><figcaption>Backup configuration page</figcaption></figure><p>Keeping backups and data on the same system will waste the system. It is necessary to prevent this situation and keep backups on a different machine in case of any situation that may occur on the machine.</p><p>We can keep backups on another server with the help of NFS, which works as a file sharing service in Unix/Linux systems. If we explain the NFS structure simply, it works with a server and client model. You need to determine the disk and storage sizes you will allocate for QRadar backups of your NFS server.</p><p>Let’s try this on an example scenario.</p><h3>NFS Server</h3><p>If your system has been minimally installed, the necessary installations must be made first. We can complete the installation on our NFS server by following the steps below.</p><h4>nfs rpm</h4><p>With the following command, you can install the necessary rpm packages on our NFS server.</p><pre>yum install nfs-utils nfs-utils-lib</pre><p>Running the NFS service</p><pre>systemctl start nfs-server.service</pre><p>Enabling the NFS service</p><pre>systemctl enable nfs-server.service</pre><h4>Export</h4><p>Under the /etc/exports directory, it is necessary to specify which directory can be shared with whom and with what permissions. When we examine this directory in detail, the parameters defined here are important against attacks on the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*AmZYKX7YgcyYRNKt9YzPAQ.png" /></figure><p>You can also view shared directories on Linux using the exportfs command.</p><p><a href="https://www.ibm.com/docs/sr/aix/7.1?topic=e-exportfs-command">exportfs Command</a></p><h3>NFS Connection on QRadar</h3><p>In the export list, we saw that the directory was made available for sharing for QRadar. If you want to control the directories shared on the QRadar server, you can use the showmount command.</p><p><a href="https://www.ibm.com/docs/en/zos/2.3.0?topic=client-displaying-server-mount-informationshowmount">Displaying server mount information-showmount</a></p><p>After completing the checks, let’s now merge QRadar and NFS directory.</p><pre>mount -t nfs -o options NFS_IP_Address:/remote/export /local/directory</pre><p>We can run the above command on the node we want to connect. After running it, our directory will now be merged with NFS.</p><p>One thing to consider here is that the connection will drop after the node reboots or restarts.</p><p><em>To avoid this situation, we do not add the following line under /etc/fstab.</em></p><pre>NFS_IP_Address:/remote/export /local/directory nfs rw,soft,intr,noac 0 0</pre><p>NFS is mounted. You can now move your backups under /store/backup to the NFS directory with crontab.</p><pre>* 4 * * * cp /store/backup/backup.nightly.(hostname)$(date -d &#39;-1 day&#39; +%d_%m_%Y).*.tgz /local/directory </pre><p>In the example command above, the last backup taken at 4 o’clock every night will be copied to the nfs directory.</p><p>Additionally, if you want to keep your Backup Retention period very long, you can use the scripts in the link below.</p><ul><li><a href="https://github.com/volky26/Python-scripts/blob/main/with_logging.sh">Python-scripts/with_logging.sh at main · volky26/Python-scripts</a></li><li><a href="https://github.com/volky26/Python-scripts/blob/main/with_writing_file.sh">Python-scripts/with_writing_file.sh at main · volky26/Python-scripts</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7327b02d7a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Create A Rule On QRadar]]></title>
            <link>https://medium.com/@vlknerdem/how-create-a-rule-on-qradar-7343d39c9374?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/7343d39c9374</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Wed, 07 Jun 2023 14:41:01 GMT</pubDate>
            <atom:updated>2023-06-07T14:41:01.422Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone, while you read this writing, you will experience how QRadar offense is working by using setting local firewall off. It is also undertsanble for beginner.</p><p><strong>What awaits you in this article?</strong></p><p>If I explain braifly what I do, I will try to close local firewall on windows by this comment in powershell. Then, I am waiting to see an offense which is related to closing local firewall.</p><p>Before the creating rules on QRadar, you must have <strong>Audit Process Creation</strong> auditing enabled to see <strong>event ID 4688</strong> on Windows side. If you need help how to see event ID 4688, there is a content which show how to configure by following link.</p><p><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing">Command line process auditing</a></p><h3>Creating Rule To Detect Closing Local Firewall</h3><p>First of all, you must get security logs to QRadar. After that, you could create the Rule by filtering the security logs.</p><blockquote><em>While you are writing a rule, filters should be written from general to specific. When writing a rule, the performance status of the rule should be taken into account. Starting point of filters can be log source or log source type.</em></blockquote><p><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior">Changing status of the local firewall with a command run on powershell is logged in <strong><em>4688 Event ID</em></strong>.</a></p><p>Due to these records will contain other information, we need to filter the <strong>processes </strong>run with netsh in these records. Since we write from general to specific before filtering these logs, we need to filter 4688 Event ID first.</p><blockquote><em>Last filter to catch the right log. Filter the command that will set off the local firewall in netsh processes.</em></blockquote><p><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior">Use netsh advfirewall firewall context - Windows Server</a></p><p>When we put it all together, the rule looks like following figure.</p><p>Now, the rule is ready to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*yUNtDvfIHBbqTIJV.png" /><figcaption>Rule for setting off local firewall</figcaption></figure><h3>Part 2 : Rule Response</h3><p>In part 1, the rule has been created to detect setting local firewall off.</p><p>In this part, What is the difference between Rule Action and Rule Response ? What are they doing ? How do they trigger offense? Let’s answer these questions!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*ZSLhGy6lBmEe7aCJ.png" /><figcaption>Rule Wizard: Rule Response</figcaption></figure><p>After filter is ready, you need to decide how you will trigger offense. There are many parameter on Rule Response page.</p><ul><li><strong>Rule Action</strong> is responsible what you want to do with</li><li><strong>Rule Response</strong> is responsible how you want to inform you</li></ul><h3>Rule Action</h3><p>Generally, rule action is related to what you want when you detect event. These are actions to take when an event occurs that triggers this rule.</p><p>You can set to severity, credibility and relevance from 0 to 10 with detected event.</p><p>You create an offense by using “<strong>Ensure the detected event is part of an offense”</strong>. Detected events can index based on properties in order to create an offense.</p><blockquote><em>Indexing based on properties is important for offense. If properties in detected event are same, all detected events will be in same offense.</em></blockquote><p>For example, when you index it based on <strong>Source IP</strong>, if <strong>different user</strong> is caused detected event <strong>on same server</strong>, <strong>an offense</strong> will have created. Another example is that, when you index it based on <strong>username</strong>, if <strong>same user</strong> is caused detected event <strong>on different server</strong>, there will be just <strong>one offense</strong>. Event if detected events are caused <strong>on same server</strong> by <strong>different user</strong>, there will be more than <strong>one offense</strong> according to user.</p><h3>Rule Response</h3><p>Rule response is related to how rule alert you when event is detected. It means that they are responses to make when an event that triggers this rule.</p><blockquote><em>Rule response has many options to inform you. Response can not be always an event notification. It can be adding/removing reference set or sending an email.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*_vbqGXKj-kI59GDK.png" /><figcaption>Rule Response</figcaption></figure><p>If you want to see an event related with this rule, you should choose dispatch new event. You can modify event details as you can see on following figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*6Pu8Ck8cxmWtjt0l.png" /></figure><p>After you trigger the rule, there will be an event which called <strong>Event — Disable Firewall By Advfirewall </strong>on <strong>Custom Rule Engine </strong>as you can see on following figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gYBx813tW5RWencf.png" /><figcaption>Dispatched Event on CRE</figcaption></figure><p>Rule Response has an option to create offense which is called same with dispatched event name. Also, there are more 2 options for offense naming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*7ejXxMOrmYa3f8ip.png" /><figcaption>Naming for offense</figcaption></figure><p>As you can see following figure, there are 2 offenses which are same name with dispatched new event. This offense indexes events based on Username therefore there will be created offense source according to username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*nGoedGbWb6wVt8whnPjxCQ.png" /><figcaption>Offenses</figcaption></figure><h3>Part 3 : Experiment</h3><p>Until now, we have discussed abput how to create rule and offense by using example for disabling local firewall. Let’s experiment by using 2 different server and 2different user. Let’s see how the results will be?</p><p>We want to see how events and offense effect to the rule in scenarios. In short, we will see how rules are formed with different indexing methods using server and user combinations in scenarios.</p><ul><li><strong>First scenario: </strong>2 different user on same server. The indexing will be username and source IP in order. When it indexes by username and source IP, we will see the results.</li><li><strong>Second scenario</strong> : Same user on different servers. The indexing will be username and source IP in order. When it indexes by username and source IP, we will see the results.</li><li><strong>Third scenario</strong> : In this experiment, indexing which is on Rule Action will be Source IP. Another indexing which is on Rule Response will be Username. There will be 2 different users and 2 differet servers . We will try to see result which same user on different servers while both indexing are different each other. Also, we will try to see result which different users on different servers while both indexing are different each other.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Br3DWDlBuMvROSA_.png" /><figcaption>Sample for first scenario</figcaption></figure><h3>First scenario</h3><ul><li>As you can see in the first part of the figure below, two different users tried to turn off the local firewall on the same server.</li><li>In the second part of the figure, there are 2 events which are related to detected events. Because each detected events created dispatched event.</li><li>In the last part of the figure, you can see how the resulting offenses are indexed in the offense type field.</li><li>The source IP addresses are the same because different users are using the same machine in the experiment. Since the source IP addresses are the same, the offenses indexed according to the source IP addresses created 1 offense. You can see last raw in the last part of figure.</li><li>Usernames are different because different users are using the same machine in the experiment. Since the user names are different, the offenses indexed according to the user names created 2 offenses in the last part of figure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eEVxI_bsHgo617q5.png" /><figcaption>Experiment 1</figcaption></figure><h3>Second scenario</h3><ul><li>As you can see in the first part of the figure below, an user tried to turn off the local firewall on 2 different servers.</li><li>In the second part of the figure, there are 2 events which are related to detected events. Because each detected events created dispatched event.</li><li>In the last part of the figure, you can see how the resulting offenses are indexed in the offense type field.</li><li>The source IP addresses are the different because different servers are using by same user in the experiment. Since the source IP addresses are different, the offenses indexed according to the source IP addresses created 2offense. You can see them in the last part of figure.</li><li>Usernames are same in this experiment. Since the user names are same, the offenses indexed according to the user names created 1 offenses in the last part of figure. You can see it which is last raw in last part of figure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vK4Z6obug7HCDsEl.png" /><figcaption>Experiment 2</figcaption></figure><h3>Third scenario</h3><ul><li>As you can see in the first part of the figure below, there are 3 events unlike previous experiments. 2 users tried to turn off the local firewall on 2 different servers.</li><li>In the second part of the figure, there are 3 events which are related to detected events. Because each detected events created dispatched event.</li><li>In the last part of the figure, you can see how the resulting offenses are indexed in the offense type field.</li><li>When we look at the detected logs, 2 offenses will occur because they are indexed according to user names. There are 2 different usernames in these 3 logs in the first part of the figure. However, 2 offenses will occur in indexing according to source IP addresses. Because 2 different servers are used. As can be seen in the last part of the figure below, a total of 4 offenses will occur.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rC1cEv9xp-1X_AYL.png" /><figcaption>Experiment 3</figcaption></figure><p>After this experiment, you can customize the rules you want to detect and set the notifications to inform you.</p><p>I hope it was useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7343d39c9374" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FULL-STACK APPLICATION FOR SPAM DETECTION]]></title>
            <link>https://medium.com/@vlknerdem/full-stack-application-for-spam-detection-8ba86f10d328?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ba86f10d328</guid>
            <category><![CDATA[spam]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[filters]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[text-mining]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Sun, 29 May 2022 10:03:44 GMT</pubDate>
            <atom:updated>2022-05-29T10:03:44.532Z</atom:updated>
            <content:encoded><![CDATA[<p>This project is to detect spam e-mail by using classification algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*igDW-qYQQh_FS0Ky.jpg" /></figure><p>Todays, every computer user receives many spam e-mail. Some spam e-mails may only contain harmless advertising and promotional content only. Apart from these types of emails, others may contain lots of harmful contents. Sometimes careless users open these e-mails and infect their computer with harmul content. Labeling spam e-mails correctly is important and will reduce human error as well.</p><p>This project is useful for beginners data science. It is a good starting point for Natural Language Process, especially text-processing. As you know we work on text-processing for detection spam e-mail. In this project, a labeled dataset was used for supervised learning.</p><blockquote>This project is designed in similar way to <strong>MVC</strong>. The machine learning structure was used as a controller for the text entered from the frond-end.</blockquote><blockquote>Learning algorithm depends on density of words in the spam or non-spam labeled data.</blockquote><p>Before we start coding, I want to explain how text-processing was used in this project. The data in the data set, or entered on front-end, is text; although the learning algorithm is based on words. Firstly, these texts should be decomposed into words. Then, they should become usable in the learning algorithm.</p><p>Natural Language Toolkit (NLTK) library has many useful methods for text-processing. Before words were ready to be used in learning algorithm, the below steps were followed:</p><p><strong>1 - </strong><em>Transforming into lowercase text</em><br> <strong>2 - </strong><em>Cleaning unneccessary characters</em><br> <strong>3 -</strong><em> Parsing into words</em><br> <strong>4 -</strong> <em>Filtering words by type</em><br> <strong>5 -</strong> <em>Simplification</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*njkRnYG0gUcFFkBBSGfSKA.png" /><figcaption>Text-Processing</figcaption></figure><p>Edited texts is added to dataset as a new column with each row matching its data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*9qOEAGp3Td1tZEdDLILPWQ.png" /><figcaption>Adding a new column</figcaption></figure><p>Now, dataset can be used with a new column for learning algorithm. Before training our learning model, as you guess since all data is word, it must be digitized. Vectorizing and tokenizing are using in order to digitize for words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*q7HbjBtq8WRtoEHWS2f4ug.png" /><figcaption>Vectorizer and tokenizer</figcaption></figure><p>By the way, pickle library uses to store data in a file. The data stored in the file is used for the controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*nf8_S9l3u-AjvxCow307kQ.png" /><figcaption>Creating model and training the model</figcaption></figure><p>I choosed Multinomial Naive Bayes algorithm for classification. I will explain why I choosed this method in another publishment of Medium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*LENJZ3rcAfQXw-iurTpqxA.png" /><figcaption>Finding hyperparameter</figcaption></figure><p>After necessary parameters of learning algorithm was determined, this data was stored to be used later in a file.</p><p>Now, controller is ready. We can start to create a model for website. Blueprint is useful for a flask project so that my app was created by using blueprint.</p><p>“<strong><em>create_app</em></strong>” function in “<strong><em>__init__.py </em></strong>” file was used to create app for this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*nGdJynE3I8rAEGOU3bzQew.png" /><figcaption>Create app</figcaption></figure><blockquote>Design of front-end depends on you but <strong>id </strong>and <strong>name </strong>of text entered from front-end are “mail”. It is communicated with the back side using these tags.</blockquote><p><strong>POST </strong>and <strong>GET </strong>methods were used in this project. While the page is refreshed, <strong>GET </strong>request is sending. When the text is entered in the text-area from frond-end, <strong>POST </strong>request is sending.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6uYz_7XHaeE51I9GzmqZA.png" /><figcaption>Backend (Model)</figcaption></figure><p>Before the classification is made, the text entered from page goes through the text-processing in order to make usable to use for learning algorithm. The text is tokenized by using first pickle file. Then, by using predict in second pickle file, result is estimated for the text.</p><h4>RELATED LINKS:</h4><ul><li><a href="https://github.com/volkaner1/spam-detection-by-flask">GitHub - volkaner1/spam-detection-by-flask: spam detection by using flask</a></li><li><a href="https://www.nltk.org/">NLTK</a></li><li><a href="https://docs.python.org/3/library/pickle.html">pickle - Python object serialization</a></li><li><a href="https://flask.palletsprojects.com/en/2.1.x/">Welcome to Flask - Flask Documentation (2.1.x)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ba86f10d328" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is fileless malware?]]></title>
            <link>https://medium.com/@vlknerdem/what-is-fileless-malware-d9e6b4e5f102?source=rss-fe33da4268ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9e6b4e5f102</guid>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[weaponization]]></category>
            <dc:creator><![CDATA[volkan erdem]]></dc:creator>
            <pubDate>Wed, 18 May 2022 12:29:58 GMT</pubDate>
            <atom:updated>2022-05-18T12:29:58.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/807/0*lrHpCOxLsnf4_wDQ.jpg" /></figure><blockquote>It’s time. This is my first post. I would like to apologize in advance if you realise any fault. Let’s start.</blockquote><p>First and foremost, we must define malware. By making changes, it is a software that disturbs and disables systems. So, what exactly is a fileless malware? It’s a form of malicious software.</p><p>Unlike traditional malware, fileless malware is malware that uses legitimate programs instead of using files and the file system. It makes it difficult to detect because it does not rely on files and leaves no traces. Generally, this type of malware is designed to run in memory.</p><p>We can examine the fileless malware in two groups. <strong><em>in-memory fileless malware and script file-based fileless malware</em></strong></p><blockquote><strong>In-memory fileless malware:</strong></blockquote><p>Most antivirus programs have databases with signatures of malware files to detect malware. In this way, it is able to detect malicious software that may cause any changes made to the file or disk.</p><p>When a malware infects a computer, it copies itself to memory. Then, the malware running in-memory can be hidden from antivirus programs. Even if they suspect fileless malware processes, they will not do anything for those processes. Terminating any suspicious process may result in the loss of the user’s unsaved data.</p><p>It puts the load directly on memory generation detection and infection symptoms that are difficult to identify. Most memory-resident malwares are built to inject code into registry entries.</p><blockquote><strong>Script file-based fileless malware:</strong></blockquote><p>Script-based fileless malware is designed to take advantage of security flaws in Microsoft Office, Windows applications and Powershell.</p><p>Powershell is a very flexible and powerful program that can be used by attackers. Since it is a reliable program pre-installed on the Windows operating system, it is actively used by attackers as it avoids most antivirus detections. Payloads can be loaded into the operating system’s memory using Powershell and can be executed without writing anything to disk.</p><p>This capability makes Powershell a target for fileless malware.</p><p><strong>The Windows Registry</strong> stores the settings of the Windows operating system and some applications. In the Windows Registry, threat actors inject the entire malicious payload into the registry to evade detection. Due to its fileless nature, it self-destructs without leaving any traces after completing its malicious intent.</p><blockquote>Fileless malware, unlike traditional malware, does not leave a trace on the file system, so it is very difficult to be caught by antivirus or anti-malware programs.</blockquote><p>It can easily affect computers by using the vulnerabilities of programs such as web browsers, pdf readers or flash players. It can even be loaded into memory without leaving a footprint thanks to phishing e-mails.</p><p>Fileless malware can be caught or prevented with measures such as logging, least privileges and behavior analysis programs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9e6b4e5f102" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>