Saturday, 3 July 2021

Git and Github

 What is GitHub and Git ?

Git

 a bit of history....

Git is a software that was created by linux creator linus torvalds in 2005.It was originally created to maintain the various versions of the linux operating system. Just like the linux project it was created as a hobby project and linus never thought that it would gain worldwide recognition and that this would turn out to become the de-facto for version control systems.

 what the heck is a VERSION CONTROL SYSTEM ????

 Have you ever wondered that the daily apps that you use get updates at times and they are renamed verion x.y.z with new features and maybe a new look and design and how do the company/individual behind it maintain all those versions ? That's where a version control system comes in.... the purpose of a version control system is to keep track of the changes that are being  made from version to version. During torvalds there weren't many of those VCS(version control system).So linus developed an entirely new vcs based on a fundamentally different paradigm.Whereas most of the vcs prior to git in the 1990s and 2000s were second generation vcs , git is a third generation vcs. The difference being that second gen vcs were centralized but git was decentralized.

GitHub

 What is GitHub then Whats the difference between the two...

GitHub is a platform that makes use of the git vcs to maintain (save, edit , update and collaborate) the applications and software of company's or individuals.Say you have made an app or a program that you want to show other people and let them contribute to it ..how'd you do that? simple just go to github and create an account then create a public repository(think of repository as a folder) and upload your code there and boom! you program is now accessible to anyone with an active internet connection and others can now fork your code( analogous to downloading an exact copy of the program that you uploaded ) and then make changes or add features to it and use it themselves or maybe create a "pull request" to your repository and then you can choose to "merge" those changes if you feel like ;-).There are tons of other features that GitHub has to offer from CI/CD to code checks and other DevOps tools. In 2018 GitHub was acquired by microsoft.. but dont worry it still maintains itss developer-first ethos and is still an opensource platform completely free to use... 

 Alternatives to GitHub:

Now you might be wondering what are other alternatives to GitHub or are there any ? .... the answer is yes ...there are many other platforms just like github  that let people like you and me collaborate on projects or maybe even just create a corner of the internet for ourselves ;-) , who doesn't wants that....

 Some of the most common and popular alternatives to GitHub have been listed below: 

  1. GitLab  : GitLab is by far the most popular alternative to Github with almost all the features present in GitHub and better support for DevOps it is the perfect alternative to choose among the others
  2. BitBucket : Bitbucket is version control tool developed by Atlassian. It is more than just Git code management. It has trello and jira integration built in. 
  3. SourceForge : SourceForge is an open source development and distribution platform. The tool is hosted on Apache, Allura, and supports many different projects. Users can select either Git, Mercurial as their version control system. 
  4. Gogs : Gogs is another GitHub alternative which makes the easiest and faster way of setting up self-hosted Git services. With the help of this version control tool, you can perform independent binary distribution across various platforms. It is efficient and has decent performance.
  5. Gitbucket :  Gitbucket is a high extensibility open source tool for hosting source code for the software development process.

.... just to name a few........

 

other use cases of github

now you can use github for other purposes too ... like use it for storing some important files of yours, or create writeups and code examples from various competitions and hackathons.... there can be plenty of other use cases too...

check out my GitHub account here : DarkCodeOrg  ;-) 

have a nice day....



Thursday, 9 July 2020

Hack The Box (invite challenge)

Hack The Box (invite challenge)

spoiler: i would recommend you to try the challenge yourself at first if you fail after  considerable times then only see this 
step 1:  
At first we open up the page which asks us for the invite code, using chrome or firefox dev tools in the network tab we can see that the page makes a request to https://www.hackthebox.eu/js/inviteapi.min.js  

step 2:

opening up the js file we can see many things listed there. It was obfuscated js code. Decoding the obfuscated code using a online jsbeautifier we get a function makeInviteCode. We open up the first page and in the cosole log enter the function makeInviteCode(). Passing that function and pressing enter would give you a return message which is  encrypted with the encryption type given alongside, decrypting the message using any online decrypter we get    ::   "In order to generate the invite code, make a POST request to /api/invite/generate" 

step 3:

Thus we fire up burp to modify our request, then turn on intercept in proxy tab then we open the page https://www.hackthebox.eu/api/invite/generate using our browser then modify the http request type to POST and then move to the web page revealing the http response gave us a Base64 encoded string, on decoding it we get the invite code 

the same could have been achieved without using burp use the following command 


$ curl -X POST https://www.hackthebox.eu/api/invite/generate 

this would reveal the response in your terminal then decoding the base64 encryption would give you the invite code



happy hacking, :-)












CTF's What are they and Why should you care ?

Capture The Flag events aka CTFs Capture the flag competitions are an excellent way to get started with hacking. Ctfs are organized by vario...