Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, 14 June 2020

Introduction to Linux

LINUX : The Future of Operating systems

If you have working in the tech field for a while or are interested in technology and computers then you might have came across people talking about linux. People have varying thoughts on linux and you are free to share your thoughts in the comment section. So today i would be giving a intro to linux and how i entered the world of linux and opensource. 


A brief introduction to linux and other operating systems

You are most probably viewing this page using your mobile phone or laptop or desktop which has an operating system installed on it. Now the actual work of the operating system in the most basic sense is linking your softwares with the hardware and making everything work. So its clear that without the operating system you would be left with just your bare-metal machine(pretty unusable). Hence the os plays a major role in your computational life. Now linux is not "just another operating system" , its different and infact every os is different as a whole. Why linux is different is described in the rest of the post below keep scrolling.

A bit of History

Now the operating systems that we use today didn't came out suddenly, previous to these their were tons and tons of operating systems, you can read about them here. The revolution in operating systems came after the introduction of the Unix operating system created by Dennis Ritchie and his coworkers at Bell Labs. It was a great step towards inclusion of computers in various fields.Since then many other operating systems have emerged, but the macintosh was the first one with the personal computing as its main motto and then came windows.Traditionally macintosh was based on BSD( berkeley software distribution which was again based on unix).Linux was the younger brother of these operating systems.Linus torvalds the creator of the linux kernel created linux as he didn't had the money to buy unix and was bored using MSdos. After some time one of torvalds friends proposed him to make his project opensource and he agreed to that. Since then numerous changes have been made to linux and it has finally reached this stage where it powers all of the top 500 supercomputers in the world ;-)

so its lot of history not possible to explain in this one post, so lets dive directly into the topic.

Linux : Features

Previously linux was not as user friendly as it is now. In the olden days people regarded linux users as tech savvy and geeky and it was true since most of the work was done via the powerful command line (terminal).Still today system administrators use the command line to manage huge servers of huge companies.But frankly speaking the UX of linux has changed a lot it has got some similar click and point features like mac and windows but the powerful terminal is still there which attracts millions of user till date.The windows command propmt or cmd stands nowhere near the powerful linux terminal.

listing some of its features:

  • On its own linux is extremely secure but that does not mean it cant be hacked.Everything is hackable nothing is super secure, but linux provides better security than most of the operating systems in the market. Take a simple example , if you have to install a software in windows you will probaby go to the site of software and download your software but you cant be sure that your browser is not compromised and someone might be doing a MITM (man in the middle attack) attack on you, thus serving you malware instead of the legitimate software.But in linux its pretty easy just, just fire up your terminal and  write a or two commands and the package manager of your os will fetch that software for you isnt that cool.
  • Second most probable reason of shifting to linux might be its cost.And good news its free. Its not only free but its opensource, that means you can fork it and modify it at your please.
  • After using linux for a considerable time you will understand that linux gives a closer look to your computer.You will come across things which you might have ever known using windows or mac.Its true that using linux is a bit harder in the beginning but once you get started nobody can stop you.
  • With linux you have the complete rule over your computer you can tinker with it to make it your very OWN computer.Linux doesn't binds you to the defaults or rules, you are on your own.But remember with great power comes great responsibility, so don't panic your kernel otherwise it will give you a pain in the butt.
  • there are plenty more reasons to shifting to linux the list is never ending.. 

So if you have made your mind to shift to linux then checkout this.

If you are still reading then i think you want to know more about linux, so lets dive straight into it 

You can go and have a look at this site which has got plenty of posts related to linux.


The learning curve of linux might be a little steep but things have changed a lot than it used to be years ago, the present state of linux OSes is pretty good and easy to learn, many things which were done previously via the linux terminal can now be done using simple GUI. Inspite of this the main attraction of linux operating systems is its Terminal with which you can do almost anything and everything and sometimes more efficiently than the GUI.Another good fact is that its opensource that means you can modify it to your needs and nobody is gonna stop you, Even you can install linux from scratch (LFS) that is your system would be your very own system free fom bloatware and unnecessary stuff but its not recommended for complete beginners since it could scare them off from the beautiful linux world even theres a popular saying that Pushing Newbies towards arch linux(an advanced linux operating system) is SIN. 

So thats all about saying rest is all dependent on the user and as i always say use the things that keep you productive throughout the day.  ;-)

have a nice day,




















Saturday, 6 June 2020

HSCTF 7 (web : Debt Simulator) Writeup

I visited the Page which looked like this: 

First i tried out what the website is doing.
When I clicked on the button, it adds or subtracts a value and show how much I won or lost.

Next I opened the developer tools went to the network tab and reloaded the website.
When I then clicked the button, I saw a request is being sent to https://debt-simulator-login-backend.web.hsctf.com/yolo_0000000000001.


I opened this page and it showed me a response from a request.



The content of this response were a functions parameter with a list that contained 'getPay',
'getCost' and 'getgetgetgetgetgetgetgetgetFlag'.
The last one seemed really suspicious to me.
Then I started Burpsuite, opened a new project and went to the first URL again.
When I now clicked the button, Burp intercepted the request and 
I saw 'function=getPay' at the bottom.


After changing getPay to getgetgetgetgetgetgetgetgetFlag 


I forwarded the request and went back to the website.


There we have our flag =) 

Thursday, 28 May 2020

Beginners guide to linux

Welcome friends this is my first post.Here i am going to discuss with you how to shift to linux from MacOS or Linux.

so lets get into it,

After Microsoft ended support for windows 7 many people have migrated to a linux environment.Whatever might be the reason for your migration linux community will appreciate it and welcome you with a warm greeting.

Note: Always use the operating system that best suits your needs and keeps you productive throughout the day.


Best Distros for Beginners

First of all if you have done a bit of Google Fu then you must have come across the word Distro. Now what is a distro(or distribution in broad)? 
A distro is a collection of software built around the linux kernel.Basically there is not much difference between the distros apart from the fact that they have different package managers (coming to them later).So there are plenty of beginner distros laid out. Naming some:
  1. Ubuntu               {pros :  most popular linux distro, Great community support, ease of  use ....                                         cons : a bit resource heavy lags on old hardware}                                                                           
                                                                                                                                 
  2. Linux Mint         {pros : lightweight , easy to use , windows like look and feel,good community                                                      support....                                                                                                                       cons : not as popular as ubuntu but there has been a lot improvement in its                                                  popularity}                                                                                                                               
                                                                                                                 
  3. Elementary OS   {pros : look and feel like a mac os , great look and feel                                       cons : community support is a bit slower}[dont get afraid by the purchase option on their website just click it and it will start download you dont need to pay anything its open source ;-) ]                                       
                                                      
  4. Zorin OS             {pros : windows users will feel just at home, plenty of essential pre installed                                              software}                                                                                                                                                 
                                                              
  5. Manjaro linux     {pros : get the taste of the legendary arch linux distro without the hassle ,ease                                            of use, serves bleeding edge software                                                                                       cons : although it promises to provide you with the latest software in the                                                    market   you dont get it before two weeks or so }                                          
There are plenty more of them but it is not possible to list all of them in one page. You can checkout the distro's and their rankings on Distrowatch.

How to get started?


So after you have chosen your distro you can move forward.If you are confused with the plentiful distros then my suggestion would be try out them in a live cd or usb, its the best option, a live environment will not make any changes to your main machine or system and you will get the opportunity to test them before you start using them , and don't wait for any body ,not even me, to tell you that this distro is good this one is bad blah..blah... Just roll out the distro and check it out yourself.


After you have checked and decided which distribution meets your needs you can just follow the easy installation steps provided by the distribution.


How to make a live CD or USB? 


STEP 1  :        To make a live cd or usb you will need the iso image file of the distribution.Go to the official page of your chosen distro and grab the iso file.Chose the iso file according to your cpu architecture (32 bit or 64 bit ) and if you are unsure about that then go for the 32 bit iso (drawback is that a 32 bit iso can only support upto 4gb ram so it would be better if you check out your cpus architecture by a simple google search)


STEP 2  :        Now if you have downloaded the iso image file you have to download a software for burning the iso file to the usb or cd(burning to a cd  requires a software it can be done from the iso image burner, you can download it and use it but here i have focused on usb since most iso files are a bit larger in size).


                   Windows /MacOS


If you are on windows or mac os then i would prefer you to install Rufus. It has a good UI and is easy to use.Just download the software and run it as administrator.

Then insert your usb  into the computer. 
[warning: keep a backup of all your personal files on the usb or cd since after the burning of the iso everything on it will be lost]. 

Then  select your USB drive from the device dropdown menu in rufus.

Place a checkmark  next to the "Ceate A Bootable Device" box and select "iso image" from the dropdown menu.

Now navigate to the folder where you downloaded your .iso image file and click "open"
{keep the rest of the settings to default and dont make any changes}

Click on ”Start” 

Click on “OK” to confirm that you want to erase and format the USB drive for use with Rufus.

Once the burning is completed you can close the software and eject your USB safely.

Linux


if you are a linux user then you can use the dd utility (CAUTION) to burn your iso image file to the disk 


            first of all unmount your usb 
            $ umount  /dev/sdb  {sdb is the device name in my case check out your                                                      device name using    :    $ fdisk -l }

Now you can use dd but be careful check out your command twice before pressing enter since its a destructive tool 

             

             $ mkfs.vfat  /dev/sdb -I     {this will format your drive to FAT filesystem}


             $ sudo dd if = /path/to/iso/file  of = /path/to/usb/   


     [ IF stands for Input File and OF stands for Output File ]


grab a cup of coffee till dd completes its task ;-)


now after dd has completed burning it will display an ok message to you that ensures the file is burnt properly.


Now you are ready to rock with your USB.


How to boot into the live system?


After you are done with creating a bootable usb now you can boot your system to the live environment and enjoy your new OS.


shutdown your computer and insert your usb drive into the computer and then restart your computer

Press F12/F2/F10/esc/del key {depending on your motherboard search google for your motherboards specification for key to enter bios menu} to enter BIOS menu.

There you have to navigate to the boot device selection menu and select your usb device or move your usb device to the top of the boot device priority list.Then press enter to boot to your usb drive.

now you can follow the instructions provided by your distro.You should have a try now or live option select that before installing and then chose the distro which pleases you and go for it.Most of the linux distributions provide a Graphical installation window except for ARCH LINUX.

I would recommend you dont go for debian or Arch or Gentoo or Slackware since they are regarded as some advanced linux distros. Obviously once you get used to linux environment and the command line you can move to Debian or Arch or ...



        Have a Nice Day;















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...