Visitors To This Post

Search This Blog

Thursday, August 15, 2019

Kali-Linux-DATA_Reference

PWD:013370


Kali-Linux-DATA_Reference



Oldest Archived  /Root

 Index of /

[ICO]

[   ]
2019-01-14 13:57
519
[DIR]
2019-05-19 16:40
-
[DIR]
2018-09-14 19:33
-
[DIR]
2018-10-29 07:16
-
[DIR]
2019-02-17 19:06
-
[DIR]
2019-03-04 14:04
-
[DIR]
2019-05-19 16:40
-
[DIR]
2019-08-11 04:06
-
[DIR]
2014-12-04 14:11
-

Apache/2.4.10 (Debian) Server at cdimage.kali.org Port 80
#
#
#

Index of /kali-weekly

[ICO]

[PARENTDIR]

-

[   ]
2019-08-11 04:06
762

[   ]
2019-08-11 04:06
833

[   ]
2019-08-11 04:06
1.0K

[   ]
2019-08-11 04:06
833

[   ]
2019-08-11 01:24
2.8G

[   ]
2019-08-11 03:51
2.8G

[   ]
2019-08-11 01:45
2.7G

[   ]
2019-08-11 02:09
3.1G

[   ]
2019-08-11 02:22
1.0G

[   ]
2019-08-11 01:47
768M

[   ]
2019-08-11 04:04
1.0G

[   ]
2019-08-11 02:42
2.6G

[   ]
2019-08-11 03:05
2.7G

[   ]
2019-08-11 03:26
2.7G


Apache/2.4.10 (Debian) Server at cdimage.kali.org Port 80













Repositories:



The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.
Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.

Regular repositories

On a standard, clean install of Kali Linux, you should have the following entry present in /etc/apt/sources.list:
  
deb http://http.kali.org/kali kali-rolling main non-free contrib
You can find a list of official Kali Linux mirrors here.

Source repositories

In case you require source packages, you might also want to add the following repositories as well:

deb-src http://http.kali.org/kali kali-rolling main non-free contrib

The kali-dev repository

WARNING: While kali-dev is publicly accessible to everybody on all Kali mirrors, this distribution should not be used by end-users as it will regularly break.

Index of /data/packages/kali-dev/amd64/


../
2/                                                 18-Jul-2019 06:15                   -
3/                                                 05-Mar-2019 15:10                   -
4/                                                 05-Mar-2019 15:10                   -
6/                                                 19-Jul-2019 12:15                   -
a/                                                 17-Jul-2019 06:15                   -
b/                                                 10-Jul-2019 12:15                   -
c/                                                 10-Jul-2019 12:15                   -
d/                                                 15-Jul-2019 18:15                   -
e/                                                 20-Jul-2019 12:15                   -
f/                                                 21-Jul-2019 12:15                   -
g/                                                 18-Jul-2019 06:15                   -
h/                                                 11-Jul-2019 06:15                   -
i/                                                 30-Mar-2019 00:15                   -
j/                                                 13-Jul-2019 00:15                   -
k/                                                 18-Mar-2019 15:00                   -
l/                                                 17-Jul-2019 06:15                   -
lib3/                                              18-Mar-2019 15:02                   -
liba/                                              18-Mar-2019 15:08                   -
libb/                                              18-Mar-2019 15:10                   -
libc/                                              14-Jul-2019 18:15                   -
libd/                                              09-Jul-2019 12:15                   -
libe/                                              18-Mar-2019 15:35                   -
libf/                                              18-Mar-2019 15:38                   -
libg/                                              18-Mar-2019 15:41                   -
libh/                                              18-Mar-2019 15:45                   -
libi/                                              18-Mar-2019 15:48                   -
libj/                                              18-Mar-2019 15:48                   -
libk/                                              18-Mar-2019 15:49                   -
libl/                                              21-Jul-2019 12:15                   -
libm/                                              21-Jul-2019 12:15                   -
libn/                                              17-Jul-2019 06:15                   -
libo/                                              18-Mar-2019 16:08                   -
libp/                                              18-Mar-2019 16:15                   -
libq/                                              18-Mar-2019 16:16                   -
libr/                                              17-Jul-2019 06:15                   -
libs/                                              14-Jul-2019 18:15                   -
libt/                                              17-Jul-2019 06:16                   -
libu/                                              18-Mar-2019 16:41                   -
libv/                                              16-Jul-2019 18:15                   -
libw/                                              18-Mar-2019 16:44                   -
libx/                                              18-Mar-2019 16:48                   -
liby/                                              18-Mar-2019 16:48                   -
libz/                                              18-Mar-2019 16:48                   -
m/                                                 20-Jul-2019 12:15                   -
n/                                                 17-Jul-2019 06:16                   -
o/                                                 18-Jul-2019 00:15                   -
p/                                                 21-Jul-2019 12:15                   -
q/                                                 09-Jul-2019 12:16                   -
r/                                                 21-Jul-2019 12:15                   -
s/                                                 20-Jul-2019 12:15                   -
t/                                                 13-Jun-2019 12:15                   -
u/                                                 09-Jul-2019 12:17                   -
v/                                                 17-Jul-2019 06:16                   -
w/                                                 18-Jun-2019 18:15                   -
x/                                                 13-Jul-2019 18:15                   -
y/                                                 18-Mar-2019 20:20                   -
z/                                                 18-Mar-2019 20:21                   -

 
This repository is actually Debian’s Testing distribution with all the kali-specific packages (available in the kali-dev-only repository) force-injected. Kali packages take precedence over the Debian packages.

Sometimes when Testing changes, some Kali packages must be updated and this will not happen immediately. During this time, kali-dev is likely to be broken. This repository is where Kali developers push updated packages and is the basis used to create kali-rolling.

About Kali-Rolling Repository.
Contrary to kali-dev, kali-rolling is expected to be of better quality because it’s managed by a tool that ensures installability of all the package it contains.

That tool picks updated packages from kali-dev and copies them to kali-rolling only when they have been verified to be installable. Note however that those checks do not include any functional testing.

It might still contain broken software due to other problems that are not covered by the package dependencies. 

Primary Repository is Kali Rolling Most Users Should Be Using. 
They can also report any issue they have with Kali specific packages on bugs.kali.org. Make sure to select the “kali-dev” version in “Product version”.
Kali Rolling users are expected to have the following entries in their sources.list:
deb http://http.kali.org/kali kali-rolling main non-free contrib
#
#
#






Using Official Repositories

The Kali Linux distribution has two repositories, which are mirrored world-wide:

Official Kali Linux Mirrors

When using the default hosts listed above, you’ll automatically be redirected to a mirror site which is geographically close to you, and which is guaranteed to be up-to-date. If you prefer to manually select a mirror, click on the mirrorlist link near each hostname above and select a mirror that suits you. You will then need to edit your /etc/apt/sources.list file accordingly with the chosen values.
IMPORTANT! Do not add additional repositories to your /etc/apt/sources.list file. Doing so will most likely break your Kali installation.

How to Set Up a Kali Linux Mirror

Requirements

To be an official Kali Linux mirror, you will need a web-accessible server (http required and https if possible too) with lots of disk space, good bandwidth, rsync, and SSH access enabled. As of early 2015, the main package repository is about 450 GB and the ISO images repository is about 50 GB but you can expect those numbers to grow regularly. A mirror site is expected to make the files available over HTTP and RSYNC so those services will need to be enabled. FTP access is optional.

Note on “Push Mirroring” — The Kali Linux mirroring infrastructure uses SSH-based triggers to ping the mirrors when they need to be refreshed. This currently takes place 4 times a day.

Create a User Account for the Mirror

If you don’t have yet an account dedicated for the mirrors, create such an account (here we call it “archvsync”):

$ sudo adduser --disabled-password archvsync

Adding user 'archvsync' ...
[...] Is the information correct? [Y/n]

Create Directories for the Mirror

Create the directories that will contain the mirrors and change their owner to the dedicated user that you just created:

$ sudo mkdir /srv/mirrors/kali{,-images}
$ sudo chown archvsync:archvsync /srv/mirrors/kali{,-images}

Configure rsync

Next, configure the rsync daemon (enable it if needed) to export those directories:

$ sudo sed -i -e "s/RSYNC_ENABLE=false/RSYNC_ENABLE=true/" /etc/default/rsync
$ sudo vim /etc/rsyncd.conf
$ cat /etc/rsyncd.conf
uid = nobody
gid = nogroup
max connections = 25
socket options = SO_KEEPALIVE

[kali]
path = /srv/mirrors/kali
comment = The Kali Archive
read only = true

[kali-images]
path = /srv/mirrors/kali-images
comment = The Kali ISO images
read only = true
$ sudo service rsync start
Starting rsync daemon: rsync.

Configure Your Mirror.
Configuration of your web server and FTP server are outside the scope of this article. Ideally, you should export the mirrors at http://yourmirror.net/kali and http://yourmirror.net/kali-images (and do the same for the FTP protocol, if you’re supporting it).

Now comes interesting part: the configuration of the dedicated user that will handle the SSH trigger and the actual mirroring. You should first unpack ftpsync.tar.gz in the user’s account:

$ sudo su - archvsync
$ wget http://archive.kali.org/ftpsync.tar.gz
$ tar zxf ftpsync.tar.gz
Now we need to create a configuration file. We start from a template and we edit at least the MIRRORNAME, TO, RSYNC_PATH, and RSYNC_HOST parameters:
$ cp etc/ftpsync.conf.sample etc/ftpsync-kali.conf
$ vim etc/ftpsync-kali.conf
$ grep -E '^[^#]' etc/ftpsync-kali.conf
MIRRORNAME=`hostname -f`
TO="/srv/mirrors/kali/"
RSYNC_PATH="kali"
RSYNC_HOST=archive.kali.org

Set Up the SSH Keys

The last step is to setup the .ssh/authorized_keys file so that archive.kali.org can trigger your mirror:

$ mkdir -p .ssh
$ wget -O - -q http://archive.kali.org/pushmirror.pub >>.ssh/authorized_keys

If you have not unpacked the ftpsync.tar.gz in the home directory, then you must adjust accordingly the “~/bin/ftpsync” path, which is hard-coded in .ssh/authorized_keys.
Now you must send an email to devel@kali.org with all the URLs of your mirrors so that you can be added in the main mirror list and to open up your rsync access on archive.kali.org. Please indicate clearly who should be contacted in case of problems (or if changes must be made/coordinated to the mirror setup).
Instead of waiting for the first push from archive.kali.org, you should run an initial rsync with a mirror close to you, using the mirror list linked above to select one.

Assuming that you picked archive-4.kali.org, here’s what you can run as your dedicated mirror user:
$ rsync -qaH archive-4.kali.org::kali /srv/mirrors/kali/ &
$ rsync -qaH archive-4.kali.org::kali-images /srv/mirrors/kali-images/ &

Set Up cron to Manually Mirror ISO Images

The ISO images repository does not use push mirroring so you must schedule a daily rsync run. We provide a bin/mirror-kali-images script, which is ready to use that you can add in the crontab of your dedicated user. 

You just have to configure etc/mirror-kali-images.conf.

$ sudo su - archvsync
$ cp etc/mirror-kali-images.conf.sample etc/mirror-kali-images.conf
$ vim etc/mirror-kali-images.conf
$ grep -E '^[^#]' etc/mirror-kali-images.conf
TO=/srv/mirrors/kali-images/
$ crontab -e
$ crontab -l

# m h dom mon dow command
39 3 * * * ~/bin/mirror-kali-images
Please adjust the precise time so that archive.kali.org doesn’t get overloaded by too many mirrors at the same time.

#
#
#






Kali sources.list Repositories

We’ve seen many people break their Kali Linux installations by following unofficial advice, or arbitrarily populating their sources.list file with unneeded repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.
Read More →

Metasploit Framework

MSF
In keeping with the Kali Linux Network Services Policy, there are no network services, including database services, running on boot so there are a couple of steps that need to be taken in order to get Metasploit up and running with database support.
Read More →

Install NVIDIA GPU Drivers on Kali Linux

This document explains how to make use of NVIDIA video hardware and install the drivers on a Kali Linux system. The first step is to fully update your Kali Linux system and make sure you have the kernel headers installed.
Read More →

Kali Linux VirtualBox Guest

Kali Vbox
Should you decide to install Kali Linux within VirtualBox, you will need to follow the instructions below in order to successfully install the Linux Guest Addition tools.
Read More →

VMware Tools in a Kali Guest

Kali
Should you decide to create your own VMware installation of Kali Linux rather than using our pre-made VMware images, you will need to follow the instructions below in order to successfully install VMware Tools in your Kali installation.
Read More →





Kali Linux Review: Not Everyone’s Cup of Tea

Kali Linux
This Linux Distro have gained popularity recently quickly. The reason for popularity is legilized hacking, and made shiny brand new for the wife and kids.

Purely clean hacking is new in town and back as the cool-thing-to-do in pop-culture, and may-be attributed to the TV series Mr. Robot.

Kali is one of many hacking focused Linux distributions, and said by many that Mr. Robot’s popularity place a fire-cracker under Kali Linux's ass getting new users.

The graph below validates this claim.



Kali Linux popularity rises with Mr. Robot TV Series
 
 
Kali Linux popularity rises with Mr. Robot TV Series

People have little knowledge of Linux or related to computer security are now trying to use Kali as their main Linux distribution getting the feel of Heroin addicted Mr. Robot's hacker life style.

Look at Kali Linux tools and you’ll find so many tools that relate to ‘hacking’.
But Kali Linux was certainly not designed for that purpose.

Of course, I could easily write an article explaining why it’s wrong to use Kali as a first Linux distribution. In fact, you could find great arguments here and here to dissuade you from using Kali unless you really have specific needs.

But I wanted to do something different. So I installed Kali Linux in VirtualBox and tried to put myself in the shoes of a ‘new user’ trying some basic tasks on his brand new Linux system. So, will I encounter some issues or will it be straightforward? Stay with me up until the end of this article to read my conclusions.



Kali Linux?


Kali Linux Review




Kali Linux developers are a private security firm Offensive Security.

The Linux core is Debian and their previous core was Knoppix-based digital forensics and penetration testing distribution BackTrack.

To quote the official web page title:
Kali Linux is a “Penetration Testing and Ethical Hacking Linux Distribution”. Simply said, it’s a Linux distribution packed with security-related tools and targeted toward network and computer security experts.

A Linux Distribution is nothing more than a bundle containing the Linux kernel, a set of core utilities and applications and some default settings. So, Kali Linux does not offer something unique in that sense most of the provided tools could be installed on any Linux distribution.

The difference is Kali is pre-packaged with those tools and the default settings were chosen according to the intended use cases of that distribution, rather than, say, to fit the needs of the typical desktop user.

In other words, whatever is your goal, you don’t have to use Kali. It is just a special distributions making easier the tasks it is specifically designed for, while eventually making other tasks more difficult.


#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



#
#
#



Linux Date-Time Shell Script Syntax

Linux Date-Time Shell Script Syntax

, , , ,

How do I format the date to display on the screen on for my shell scripts as per my requirements on Linux or Unix like operating systems?

You need to use the standard date command to format date or time in Linux or Unix shell scripts. You can use the same command with the shell script. This page shows how to format date in Linux or Unix-based system.

Linux Syntax Format Date Display On Screen

The syntax is as follows for the GNU/date and BSD/date command:
date +FORMAT
date +"%FORMAT"
date +"%FORMAT%FORMAT"
date +"%FORMAT-%FORMAT"
An operand with a leading plus (+) sign signals a user-defined format string which specifies the format in which to display the date and time. The following examples are tested on GNU/Linux, Apple OS X Unix, and FreeBSD unix operating system.

Task: Display date in mm-dd-yy format

Open a terminal and type the following date command:
$ date +"%m-%d-%y"
Sample outputs:
02-27-07
To turn on 4 digit year display:
$ date +"%m-%d-%Y"
Just display date as mm/dd/yy format:
$ date +"%D"

Task: Display time only

Type the following command:
$ date +"%T"
Sample outputs:
19:55:04
To display locale’s 12-hour clock time, enter:
$ date +"%r"
Sample outputs:
07:56:05 PM
To display time in HH:MM format, type:
$ date +"%H-%M"
Sample outputs:
00-50

How-To save time/date format in shell variables?

Simply type the following command at the shell prompt:
$ NOW=$(date +"%m-%d-%Y")
To display a variable use echo / printf command:
$ echo $NOW

A sample shell script

#!/bin/bash
NOW=$(date +"%m-%d-%Y")
FILE="backup.$NOW.tar.gz"
echo "Backing up data to /nas42/backup.$NOW.tar.gz file, please wait..."
# rest of script
# tar xcvf /nas42/backup.$NOW.tar.gz /home/ /etc/ /var

A complete list of FORMAT control characters supported by the GNU/date command

FORMAT controls the output. It can be the combination of any one of the following:
%FORMAT String
Description
%%
a literal %
%a
locale’s abbreviated weekday name (e.g., Sun)
%A
locale’s full weekday name (e.g., Sunday)
%b
locale’s abbreviated month name (e.g., Jan)
%B
locale’s full month name (e.g., January)
%c
locale’s date and time (e.g., Thu Mar 3 23:05:25 2005)
%C
century; like %Y, except omit last two digits (e.g., 21)
%d
day of month (e.g, 01)
%D
date; same as %m/%d/%y
%e
day of month, space padded; same as %_d
%F
full date; same as %Y-%m-%d
%g
last two digits of year of ISO week number (see %G)
%G
year of ISO week number (see %V); normally useful only with %V
%h
same as %b
%H
hour (00..23)
%I
hour (01..12)
%j
day of year (001..366)
%k
hour ( 0..23)
%l
hour ( 1..12)
%m
month (01..12)
%M
minute (00..59)
%n
a newline
%N
nanoseconds (000000000..999999999)
%p
locale’s equivalent of either AM or PM; blank if not known
%P
like %p, but lower case
%r
locale’s 12-hour clock time (e.g., 11:11:04 PM)
%R
24-hour hour and minute; same as %H:%M
%s
seconds since 1970-01-01 00:00:00 UTC
%S
second (00..60)
%t
a tab
%T
time; same as %H:%M:%S
%u
day of week (1..7); 1 is Monday
%U
week number of year, with Sunday as first day of week (00..53)
%V
ISO week number, with Monday as first day of week (01..53)
%w
day of week (0..6); 0 is Sunday
%W
week number of year, with Monday as first day of week (00..53)
%x
locale’s date representation (e.g., 12/31/99)
%X
locale’s time representation (e.g., 23:13:48)
%y
last two digits of year (00..99)
%Y
year
%z
+hhmm numeric timezone (e.g., -0400)
%:z
+hh:mm numeric timezone (e.g., -04:00)
%::z
+hh:mm:ss numeric time zone (e.g., -04:00:00)
%:::z
numeric time zone with : to necessary precision (e.g., -04, +05:30)
%Z
alphabetic time zone abbreviation (e.g., EDT)

A complete list of FORMAT control characters supported by the BSD/date command

The following works on Apple OS X, FreeBSD and BSD version of the date command:
%A
is replaced by national representation of the full weekday name.
%a
is replaced by national representation of the abbreviated weekday name.
%B
is replaced by national representation of the full month name.
%b
is replaced by national representation of the abbreviated month name.
%C
is replaced by (year / 100) as decimal number; single digits are preceded by a zero.
%c
is replaced by national representation of time and date.
%D
is equivalent to “%m/%d/%y”.
%d
is replaced by the day of the month as a decimal number (01-31).
%E* %O*
POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide alternate representations.
Additionally %OB implemented to represent alternative months names (used standalone, without day mentioned).
%e
is replaced by the day of the month as a decimal number (1-31); single digits are preceded by a blank.
%G
is replaced by a year as a decimal number with century. This year is the one that contains the greater part of the week (Monday as the first day of the week).
%g
is replaced by the same year as in “%G”, but as a decimal number without century (00-99).
%H
is replaced by the hour (24-hour clock) as a decimal number (00-23).
%h
the same as %b.
%I
is replaced by the hour (12-hour clock) as a decimal number (01-12).
%j
is replaced by the day of the year as a decimal number (001-366).
%k
is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank.
%l
is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank.
%M
is replaced by the minute as a decimal number (00-59).
%m
is replaced by the month as a decimal number (01-12).
%n
is replaced by a newline.
%O*
the same as %E*.
%p
is replaced by national representation of either “ante meridiem” (a.m.) or “post meridiem” (p.m.) as appropriate.
%R
is equivalent to “%H:%M”.
%r
is equivalent to “%I:%M:%S %p”.
%S
is replaced by the second as a decimal number (00-60).
%s
is replaced by the number of seconds since the Epoch, UTC (see mktime(3)).
%T
is equivalent to “%H:%M:%S”.
%t
is replaced by a tab.
%U
is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53).
%u
is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7).
%V
is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (01-53). If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1.
%v
is equivalent to “%e-%b-%Y”.
%W
is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53).
%w
is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6).
%X
is replaced by national representation of the time.
%x
is replaced by national representation of the date.
%Y
is replaced by the year with century as a decimal number.
%y
is replaced by the year without century as a decimal number (00-99).
%Z
is replaced by the time zone name.
%z
is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them (common form for RFC 822 date headers).
%+
is replaced by national representation of the date and time (the format is similar to that produced by date(1)).
%-*
GNU libc extension. Do not do any padding when performing numerical outputs.
%_*
GNU libc extension. Explicitly specify space for padding.
%0*
GNU libc extension. Explicitly specify zero for padding.
%%
is replaced by %.


123