<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>GitHub on HitCat</title>
        <link>https://blog.hitc.at/tags/github/</link>
        <description>Recent content in GitHub on HitCat</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <copyright>HitCat</copyright>
        <lastBuildDate>Sun, 07 May 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.hitc.at/tags/github/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>From a username to an exposed .git repository - PwnMe 2023</title>
        <link>https://blog.hitc.at/posts/ctf/pwnme-2023/osint/newbie-dev/</link>
        <pubDate>Sun, 07 May 2023 00:00:00 +0000</pubDate>
        
        <guid>https://blog.hitc.at/posts/ctf/pwnme-2023/osint/newbie-dev/</guid>
        <description>&lt;img src="https://blog.hitc.at/images/pwnme2023/osint/john_droper_facebook_details.png" alt="Featured image of post From a username to an exposed .git repository - PwnMe 2023" /&gt;&lt;h2 id=&#34;introduction&#34;&gt;Introduction
&lt;/h2&gt;&lt;p&gt;This challenge is an OSINT challenge from PWNME CTF.&lt;/p&gt;
&lt;h3 id=&#34;context-explanation&#34;&gt;Context Explanation
&lt;/h3&gt;&lt;p&gt;To understand the context of the challenge, refer to the introduction challenge description.&lt;/p&gt;
&lt;h3 id=&#34;task&#34;&gt;Task
&lt;/h3&gt;&lt;p&gt;As a budding developer, find information about this undeveloped passion.&lt;/p&gt;
&lt;h2 id=&#34;solution&#34;&gt;Solution
&lt;/h2&gt;&lt;p&gt;On John Droper&amp;rsquo;s Facebook profile, we can see that he has a username: &lt;code&gt;jdthetraveller&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We keep this in mind for later.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.hitc.at/images/pwnme2023/osint/john_droper_facebook_details.png#center&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Facebook profile&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;On his feed, we have information about his username. He says that he chose it on &lt;a class=&#34;link&#34; href=&#34;https://www.afnic.fr/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;AFNIC&lt;/a&gt;, which is a domain name registry solution.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.hitc.at/images/pwnme2023/osint/john_droper_facebook_profile.png#center&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Facebook profile&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Trying to access &lt;a class=&#34;link&#34; href=&#34;https://jdthetraveller.fr/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://jdthetraveller.fr/&lt;/a&gt; leads to a construction blog likely owned by John Droper.&lt;/p&gt;
&lt;p&gt;At this point, we do not have much information, so we will try to find information on the server with dirsearch.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.hitc.at/images/pwnme2023/osint/jdthetraveller_dirsearch.png#center&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Dirsearch&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;We find a &lt;code&gt;/.git&lt;/code&gt; directory that contains a &lt;code&gt;config&lt;/code&gt; file with information about the git repository.&lt;/p&gt;
&lt;p&gt;We can retrieve this file with &lt;code&gt;wget http://jdthetraveller.fr/.git/config&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;┌──&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root㉿kali&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;-&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└─# wget https://jdthetraveller.fr/.git/config
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;--2023-05-07 23:46:11--  https://jdthetraveller.fr/.git/config
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Resolving jdthetraveller.fr &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;jdthetraveller.fr&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;... 13.48.131.55
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Connecting to jdthetraveller.fr &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;jdthetraveller.fr&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;13.48.131.55&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;:443... connected.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;HTTP request sent, awaiting response... &lt;span class=&#34;m&#34;&gt;200&lt;/span&gt; OK
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Length: &lt;span class=&#34;m&#34;&gt;271&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;application/octet-stream&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Saving to: ‘config’
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;config                          100%&lt;span class=&#34;o&#34;&gt;[=======================================================&lt;/span&gt;&amp;gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;     &lt;span class=&#34;m&#34;&gt;271&lt;/span&gt;  --.-KB/s    in 0s
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;2023-05-07 23:46:11 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;3.60 MB/s&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; - ‘config’ saved &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;271/271&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;┌──&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root㉿kali&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;-&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└─# cat config
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;core&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;repositoryformatversion&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;filemode&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;bare&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;logallrefupdates&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;remote &lt;span class=&#34;s2&#34;&gt;&amp;#34;origin&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;url&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; https://github.com/droperkingjohn/myOwnWebsite.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; +refs/heads/*:refs/remotes/origin/*
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;branch &lt;span class=&#34;s2&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;remote&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; origin
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;merge&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; refs/heads/main
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First, there is a new nickname belonging to John Droper: &lt;code&gt;droperkingjohn&lt;/code&gt;. We keep it in mind for the future.&lt;/p&gt;
&lt;p&gt;We also find a link to a git repository: &lt;a class=&#34;link&#34; href=&#34;https://github.com/droperkingjohn/myOwnWebsite&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/droperkingjohn/myOwnWebsite&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.hitc.at/images/pwnme2023/osint/droperkingjohn_github.png#center&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Github&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;If we look through the commits, we find this one:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.hitc.at/images/pwnme2023/osint/droperkingjohn_github_flag.png#center&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Github&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Flag: &lt;code&gt;PWNME{W0w_th15_l00k_l1ke_4n_e4sY_Fl4G}&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;tips--tricks&#34;&gt;Tips &amp;amp; Tricks
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;dirsearch&lt;/strong&gt; to find hidden directories.&lt;/li&gt;
&lt;li&gt;In a &lt;strong&gt;.git&lt;/strong&gt; directory, you can retrieve information about the Git repository using the &lt;strong&gt;config&lt;/strong&gt; file.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;git log&lt;/strong&gt; to view the commits in a Git repository.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;git show&lt;/strong&gt; to view the contents of a commit.&lt;/li&gt;
&lt;li&gt;Examine the different commits and their comments to find information.&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
