nyuuzyou/kompy huggingface dataset:
Web-Based Attacks | 247 - Learning Kali Linux

Since 1 is always equal to 1 and the attacker has
used the Boolean operator OR, every
row is going to return a
true
. The Boolean OR says that if either side of the OR is true,
the entire statement is true. This means that every row is going to be evaluated
against that query, and the 1 = 1
is always going to return a
true
so the entire state‐
ment will evaluate to true and the row will be returned.
This is a simplistic example. Often mitigations are in place for simple attacks like this,
but the concept remains the same. The attacker submits SQL into a form field some‐
where, expecting that what is entered will make it all the way to the database to be
executed there. That’s a SQL injection attack—injecting SQL statements that are syn‐
tactically correct and accurate into the input stream, hoping to have that SQL exe‐
cuted by the database server to accomplish some result. Using a SQL injection attack,
the
attacker could insert data, delete data, gain access to the application by forcing a
bogus login to return
true
, or perhaps even get a backdoor installed on the target
machine.
XML Entity Injection
At their core, all injection attacks are the same. The attacker is sending something
into the input stream, hoping that the application will process it in the way the
attacker wants. In this case, the attacker is using the fact
that applications will often
use XML to transmit data from the client to the server. Applications do this because it
allows for structured, complex data to be sent in a single bundle rather than as a para‐
meterized list. The problem comes with how the XML is processed on the server side.
Asynchronous JavaScript and XML (Ajax) is how web applications
get around the fact that HTTP and HTML alone,
as web servers
were originally intended to work, require the user to initiate a
request. This happens by going directly to a URL or clicking a link
or a button. Application developers needed a way for the server to
be able to send data to the user without
the user initiating the
request. Ajax handles this problem by placing JavaScript in the
page that then runs inside the browser. The script handles making
the requests in order to keep refreshing the page if the data on it is
prone to constant change.
These injection attacks end up working because of something called an
XML external
entity
(XXE). In the XML being sent to the server, there is a reference to something
within the operating system. If the XML parser is improperly configured and allows
these external references, an attacker can get access to files
or other systems inside the
network.
Example 8-1
shows a sample of XML that could be used to return a file on
the system that’s handling the XML.
| Chapter 8: Web Application Testing

an actual script to be run by the browser. However, there are ways around those sorts
of limited input checks.
Persistent Cross-Site Scripting
Persistent cross-site scripting is also sometimes known as
stored
cross-site scripting
. Similarly, reflected cross-site scripting is some‐
times known as
nonpersistent cross-site scripting
.
The other type of cross-site
scripting attack is called
reflected cross-site scripting
.
Instead of being stored on a server for someone to come visit later, this type requires
that the script be part of a URL that is then sent to users. This
sort of attack looks the
same, in essence, as persistent in the sense that you would still need to generate a
script that can be run in the browser. The reflected attack requires a couple of other
things, though. First, certain characters aren’t allowed as part of a URL.
This requires
that some of the characters be URL encoded.
The process of URL encoding is simple. Any character can be rendered this way, but
some are required to be encoded. The space, for example, can’t
be part of a URL
because the browser would consider the URL complete when it hit the space and
wouldn’t consider anything beyond that. To URL encode, you need to look up the
ASCII value for the character and convert the
decimal value to hexadecimal, as neces‐
sary. Once you have done that, you add a % (percent) to the beginning of the value
and you have a character that has been URL encoded. A space, for example, is ren‐
dered as %20. The hexadecimal value 20 is 32 in decimal (16 × 2), and that is the
ASCII value for the space character. Any character in the ASCII table can be con‐
verted in this way.
The second thing that should probably happen is that
the URL should be hidden or
obscured in some way. This could be done by anchoring text to the link in an e-mail.
After all, if you were to receive an email with this in it, you probably wouldn’t click it:
http://www.rogue.com/somescript.php?%3Cscript%3Ealert(%22hi%20there!%22)%3B
%3C%2Fscript%3E
.
The target, as noted earlier, is the client that is connecting to the website. The script
could
do any number of things, including retrieving data from the client and sending
it off to an attacker. Anything that the browser can access could be handled or manip‐
ulated. This creates a threat to the user, rather than a threat to the organization or its
infrastructure. The website at the organization is just the
delivery mechanism because
of an application or script that does a poor job of input validation.
| Chapter 1: Foundations of Kali Linux

what you did while the operating system was running. If you customize or want to
maintain SSH keys or other stored credentials, you’ll need to install to local media.
Installation of Kali is straightforward. You don’t have the options that other distribu‐
tions have. You won’t select package categories. Kali has a defined set of packages that
gets installed. You can add more later or even take some away,
but you start with a
fairly comprehensive set of tools for security testing or forensics. What you need to
configure is selecting a disk to install to and getting it partitioned and formatted. You
also need to configure the network, including hostname and whether you are using a
static address rather than DHCP. Once you have configured that and set your time
zone as well as some other foundational
configuration settings, the packages will get
updated and you will be ready to boot to Linux.
Fortunately, Kali doesn’t require its own hardware. It runs nicely inside a VM. If you
intend to play around with security testing, and most especially penetration testing,
getting a virtual lab started isn’t a bad idea. I’ve found that Kali runs quite nicely in 4
GB of memory with about 20 GB of disk space. If you want
to store a lot of artifacts
from your testing, you may want additional disk space. You should be able to get by
with 2 GB of memory, but obviously,
the more memory you can spare, the better the
performance will be.
There are many hypervisors you can choose from, depending on your host operating
system. VMware has hypervisors for both Mac and PC. Parallels will run on Macs.
VirtualBox
, on the other hand,
will run on PCs, Macs, Linux systems, and even
Solaris. VirtualBox has been around since 2007, but was acquired by Sun Microsys‐
tems in 2008. As Sun was acquired by Oracle, VirtualBox is currently maintained by
Oracle.
Regardless of who maintains it, VirtualBox is free to download and use. If you
are just getting started in the world of VMs, this may be a place for you to start. Each
works in a slightly different way in terms of how it interacts with users. Different keys
to break out of the VM. Different levels of interaction with the operating system. Dif‐
ferent support for guest operating systems, since the hypervisor
has to provide the
drivers for the guest. In the end, it comes down to how much you want to spend and
which of them you feel comfortable using.
As a point of possible interest, or at least connection, one of the
primary
developers on BSD was Bill Joy, who was a graduate stu‐
dent at the University of California at Berkeley. Joy was responsible
for the first implementation in Berkeley Unix of TCP/IP. He
became a cofounder of Sun Microsystems in 1982 and while there
wrote a paper about a better programming language than C++,
which served as the inspiration for the creation of Java.
| Chapter 8: Web Application Testing

|
| Chapter 8: Web Application Testing Pdf ko'rish
|
bet | 222/225 | Sana | 14.05.2024 | Hajmi | 22,59 Mb. | | #232856 |
Bog'liq learningkalilinux248 | Chapter 8: Web Application Testing
Example 8-1. XML external entity sample
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
[
"file:///etc/passwd"
>
]
>
&xxe;
The external entity is referenced as
xxe
, and in this case, it’s a call to the SYSTEM
looking for a file. Of course, the
/etc/passwd
file will give you only a list of users. You
won’t get password hashes from it, though the web server user probably doesn’t have
access to the
/etc/shadow
file. This isn’t the only thing you can do with an XML injec‐
tion attack, though. Instead of a reference to a file, you could open a remote URL.
This could allow an outside-facing server to provide content from a server that is
only on the inside of the network. The XML would look similar except for
the
!ENTITY
line.
Example 8-2
shows the
!ENTITY
line referring to a web server with
a private address that would not be routable over the internet.
Example 8-2. XML external entity for internal URL
"https://192.168.1.1/private"
>
]
>
One other attack that could be used with this is to refer to a file that would never
close. On a Unix-like operating system, you could refer to something like
/dev/uran‐
dom
, which would never have an end-of-file marker because it just keeps sending
random values. There are other, similar, pseudodevices on Linux and other Unix-like
operating systems. If this type of attack were used, the web server or the application
may stop functioning properly, causing a denial of service.
Command Injection
Command injection
attacks target the operating system of the web server. With this
type of attack, someone could take advantage of a form field that is used to pass
something to the operating system. If you have a web page that has some sort of con‐
trol of the underlying device or offers up some sort of service (for example, doing a
whois
lookup), you may be able to send in an operating system command. Theoreti‐
cally, if you had a page that used the
whois
command from the operating system, the
language the application was written in would do something like a
system()
call, pass‐
ing in
whois
followed by what should be a domain name or IP address.
With this sort of attack, it’s helpful to know the underlying operating system so you
can pass in appropriate commands and use the right command delimiter. Let’s
assume that it’s a Linux system. Linux uses ; (semicolon) as a command delimiter. So,
we could do something like passing in
“wubble.com; cat /etc/passwd”
to the form field.
|
| |
«Pryamоugоlnik» - To’g’ri to’rtburchak

«Pryamоugоlnik» - To’g’ri to’rtburchak chizish buyrug’i asosida bajarilgan to’rtburchak. (1 ta ob’yekt)
«Оtrеzоk» - Kesma buyrug’i asosida bajarilgan to’rtburchak. (4 ta ob’yekt)
Bitta ob’yektdan iborat shakllar.
Ob’yekt va ob’yektlarni tanlash
Ob’yektlarni tanlash odatda ularni tahrirlash uchun zarur.
Bitta ob’yekt tanlanishi uchun sichqoncha ko’rsatkichi ob’yekt chizig’i ustiga olib boriladi va sichqoncha chap tugmasi bosiladi.
Bir nechta ob’yektlarni baravariga tanlash uchun odatda dinamik ramkadan foydalaniladi. Dinamik ramka bu sichqoncha yordamida ob’yektlar guruxini to’g’ri to’rtburchak asosida tanlash demakdir. Buning uchun ob’yektlar perimetridan tashqi hududda sichqoncha chap tugmasi bosiladi va sichqoncha siljitib ko’k yoki yashil rangdagi to’g’ri to’rtburchak hosil qilinadi. Bunda ramka ob’yekt yoki ob’yektlarni o’z hududiga olishi kerak. Ob’yekt (ob’yektlar) to’g’ri to’rtburchak hududida joylashgandan so’ng yana sichqoncha chap tugmasi takroran bosiladi. Natijada ob'yekt (ob’yektlar) chiziq turi o’zgarib tanlanganligini bildiradi. Ramka esa yo’qoladi.
Ko’k ramka – ob’yektlar guruxidan kerakli ob’yektlar to’plamini ajratib tanlash uchun qo’llanadi. Faqat o’z hududiga to’liq kirgan ob’ektlargina tanlanadi.
Bunday tanlashda sichqoncha ko’rsatkichi 1 – nuqtadan 2 – nuqtaga qarab yo’naltiriladi.
Ko’k ramka asosida ob’yektlarni tanlash. Natija.
Yashil ramka – to’liq ob’yektlar majmuasini tanlashni nazarda tutadi. Bunda ob’yektning biron bir qismi ramka hududiga to’liq kirmagan bo’lsa ham ob’yekt (ob’yektlar) bari bir tanlanadi. Agarda ob’yekt (ob’yektlar) ramka hududidan to’liq tashqarida qolsa u holda ular tanlanmaydi.
Sichqoncha harakati 1 – nuqtadan 2 – nuqtaga qarab yo’naltiriladi.
Yashil ramka asosida ob’yektlarni tanlash. Natija.
|
«Shrift» - Shrift - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 17/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
«Shrift» - Shrift bo’limida «Imya shrifta» - Shriftning nomi oynachasi bo’lib, undagi izoh ko’rsatkichi bosilganda bir qator shrift turlarining nomlari ro’yxati namoyon bo’ladi. Kerakli shrift nomi tanlanadi. «Nachеrtaniе» - Tuzilishi oynachasidagi izoh ko’rsatkichi yordamida shriftni kursiv, yo’g’on ko’rinishlarga olib kelish mumkin. «Visоta» - Balandligi oynachasiga sichqoncha ko’rsatkichi keltirilib bosiladi va klaviatura yordamida kerakli son kiritiladi. Natijada shriftga balandlik o’lchami beriladi. «Ispоlzоvat bоlshоy shrift» - Katta shriftni qo’llash oynachasi ayrim shrift turlarida faol emas.
|
| |
«Ugоl» - Burchak - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 22/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
«Ugоl» - Burchak tanlansa, klaviatura yordamida sonli qiymat kiritiladi va “Enter” tugmasi orqali tasdiqlanadi.
«Bissеkt» - Bissektrisa tanlansa, sichqoncha ko’rsatkichi bissektrisa o’tkaziladigan burchakning uchiga keltirilib bosiladi, so’ng burchakning har ikkala tomoni ketma-ket tanlanadi.
«Оtstup» - Ma’lum uzoqlikda nur o’tkazish tanlansa dastlab, klaviaturadan uzoqlashish masofasi sonli qiymatda beriladi va “Enter” tugmasi bosiladi. Keyin to’g’ri chiziqli ob’ekt tanlanadi. Sichqoncha ko’rsatkichi ushbu ob’ektning qaysi tomoni tanlanishini so’raydi (chap yoki o’ng, yuqori yoki pastidan va h.). Tomon sichqoncha yordamida tanlanishi bilan tanlangan ob’ektga parallel va belgilangan masofa uzoqligida cheksiz nur o’tkaziladi. Buyruqdan chiqish uchun klaviaturadan “Esc” tugmasi bosiladi.
Izoh: Tahrirlash panelidan foydalanib nur to’g’ri chizig’ining kerakli qismi saqlanib, keraksiz qismi o’chirilishi mumkin
|
| |
«Nachalо ustanоvki» - Pedagogika fakulteti

«Nachalо ustanоvki» (O’rnatishning boshlanishi) saxifasida «Dalее» tugmasi bosiladi va fayllar CD diskdan kompyuterga ko’chirilishi boshlanadi. Fayllar ko’chirib bo’lingandan so’ng «Ustanоvka zavеrshеna» (O’rnatish tugadi) saxifasi chiqadi.
«AutoCAD 2007 uspеshnо ustanоvlеn, najmitе knоpku Gоtоvо» (AutoCAD 2007 to’liq o’rnatildi, endi «Gоtоvо» tugmasini bosing) axborot oynasidan «Gоtоvо» - Tayor tugmasi bosiladi.
II Bob. “AutoCAD” dasturida ishlash bo’yicha qo’llanma (2D).
“AutoCAD” ishga tushirilgandan so’ng dastlab, chizma bajarish uchun dastur parametrlari o’rnatilishi lozim. Ushbu parametrlar o’qituvchi tomoidan o’rnatilib, talaba bevosita chizma topshiriqlarini bajara oladigan holatga keltiriladi.
Ish stoli quyidagi tartibda jixozlanishi mumkin:
Ushbu panellar zaruriy parametrlar bo’lib, ular yordamida o’quv kursining barcha topshiriqlari bajariladi. Ishchi oyna panellari bilan tanishib chiqsak.
va Standart asboblar paneli bizga informatika fanidan tanish. Ularning aksariyat funksiyalari Windows qobig’ining barcha dasturlari (Wopd, Excel, Access) kabidir;
« Svоystva» - xususiyatlar paneli chizma chiziqlari rangini, turini va qalinligini belgilab beradi.
Faol tugmalardan biri tanlansa interaktiv oyna ochiladi va unda kerakli parametrlar tanlanadi:
Chiziq turini tanlash tugmasi bosilganda uning ostida axborot oynasi ochilib dastlabki mavjud chiziq turlari ko’rsatiladi. Unda «Drugоy» - Boshqa bandi tanlanadi va «Dispеtchеr tipоv liniy» - Chiziq turlari dispetcheri muloqot oynasi ochiladi. Muloqot oynasidagi «Zagruzit» - Yuklash tugmasi bosilib, keyingi muloqot «Zagruzka/pеrеzagruzka tipоv liniy» - Chiziq turlarini yuklash oynasi ochiladi.
Ushbu faol oynadan kerakli chiziq turi tanlanib, “OK” tugmasi bosilsa bo’ldi. «Prоkrutka» - varaqlagich dastaklar yordamida keyingi chiziq turlarini ko’rish mumkin. «Dispеtchеr tipоv liniy» - Chiziq turlari dispetcheri muloqot oynasida ham “OK” tugmasi bosiladi.
|
Ob’yekt tushunchasi. Ob’yekt va ob’yektlarni tanlash

|
Ob’yekt tushunchasi. Ob’yekt va ob’yektlarni tanlash
|
bet | 11/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
2.1. Ob’yekt tushunchasi. Ob’yekt va ob’yektlarni tanlash.
AutoCAD dasturi bilan ishlashda ob’yekt tushunchasini to’g’ri aniqlab, tushunib olish lozim. Aytaylik Chizish asboblar panelidagi «Pryamоugоlnik» - To’g’ri to’rtburchak chizish buyrug’i asosida bajarilgan shaklni dastur bitta ob’yekt deb qabul qiladi. Aynan shu shakl «Оtrеzоk» - Kesma buyrug’i asosida bajarilsa dastur ushbu shaklni to’rtta ob’yekt deb qabul qiladi. Chunki birinchi usulda bitta buyruq bilan amal bajarildi, ikkinchi usulda esa to’rt marta to’g’ri chiziq chizish buyrug’i ketma – ket takrorlandi.
2. 3.
|
| |
«Tе - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 16/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
5. «Tеkstоviе stili» - Matn uslublari
Ushbu tugma bosilganda ekranda «Tеkstоviе stili» - Matn uslublari oynasi ishga tushadi. Shuni aytib o’tish joizki, matn kiritishdan oldin dastlab aynan shu oyna parametrlarini o’rnatib olish lozim.
Ushbu parametrlarga shrift turlari, o’lchami, turli vaziyatlarda ko’rinishi kiradi. Aks holda Ko’p qatorli yoki Bir qatorli matn kiritish tugmalari bosilganda har safar matn turi va o’lchamini kiritishga to’g’ri keladi.
Endi ushbu oyna bandlari bilan tanishib chiqsak.
«Imya stilya» - Uslub nomi bo’limida ko’k rangli va Standard yozuvli oynacha mavjud. Undagi (v)ko’rsatkichi bosilganda faqat Standard yozuvi mavjudligi ko’rinadi. Bu AutoCAD dasturi o’zi tanlagan parametrligidan dalolat beradi. Agar biz yangi uslublarni yaratsak unda ularning nomi ushbu ko’rsatkichda ko’rinib turadi.
Keyingi aktiv tugma «Nоviy» - Yangi tanlansa yana bir interfaol oyna ochiladi – «Nоviy tеkstоviy stil» - Yangi matn uslubi. Unda «Imya stilya» - Uslub nomi oynasida yaratiladigan uslubga nom beriladi va “OK” tugmasi bosiladi. Shuningdek, ushbu bo’limda «Pеrеimеnоvat» - Qayta nomlash, «Udalit» - Yo’qotish tugmalari mavjud bo’lib, ular ham o’z navbatida yaratilgan uslubni qayta nomlash yoki olib tashlashni nazarda tutadi..
|
| |
«Rеdaktirоvat - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 15/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
«Rеdaktirоvat» - Tahrirlash tugmasi
Ushbu funksiya tanlanganda kursor ob’ektni tanlashni so’raydi. Sichqoncha kursori tayor matn ustiga keltirib bosilganda «Fоrmat tеksta» oynasi ishga tushadi va matnni tahrirlash imkoniyati vujudga keladi. Ya’ni tuzatishlar, qo’shimchalar kiritish va h…
«Nayti» - Qidirish tugmasi
Interfaol tugma tanlanganda «Pоisk i zamеna»- Qidirish va almashtirish axborot oynasi ekranga chiqariladi.
Ushbu oynaning «Strоka dlya pоiska:» bandiga qidirilayotgan matn, «Zamеnit na:» bandiga esa almashtiriladigan matn kiritiladi. So’ng «Nayti» - Qidirish, «Zamеnit» - Almashtirish, «Zamеnit vsе» - Hammasini almash-tirish, «Vibrat vsе» - Hammasini tanlash, «Zumirоvat» - Katta-kichiklashtirish faol tugma-lari aktivlashadi. Ulardan ke-raklisi tanlanadi va «Zak-rit» - Yopish tugmasi bosiladi.
|
| |
Acquiring and Installing Kali Linux

installing into a virtual machine (VM), or it can be burned to a DVD to install to a
physical machine.
Kali Linux is based on Debian. This was not always the case, at least as directly as it is
now. There was a time when Kali was named
BackTrack Linux
. BackTrack was based
on Knoppix Linux, which is primarily a live distribution, meaning that it was
designed to boot from CD, DVD, or USB stick and run from the source media rather
than being installed to a destination hard drive. Knoppix, in turn, inherits from
Debian. BackTrack was, just as Kali Linux is, a distribution focused on penetration
testing and digital forensics. The last version of BackTrack was released in 2012,
before the Offensive Security team took the idea of BackTrack and rebuilt it to be
based on Debian Linux. One of the features that Kali retains that was available in
BackTrack is the ability to live boot. When you get boot media for Kali, you can
choose to either install or boot live. In
Figure 1-1
, you can see the boot options.
Figure 1-1. Boot screen for Kali Linux
Whether you run from the DVD or install to a hard drive is entirely up to you. If you
boot to DVD and don’t have a home directory stored on some writable media, you
won’t be able to maintain anything from one boot to another. If you don’t have writa‐
ble media to store information to, you will be starting entirely from scratch every
time you boot. There are advantages to this if you don’t want to leave any trace of
Monolithic Versus Micro - Learning Kali Linux

|
Learning Kali Linux Pdf ko'rish
|
bet | 13/225 | Sana | 14.05.2024 | Hajmi | 22,59 Mb. | | #232856 |
Bog'liq learningkalilinuxMonolithic Versus Micro
Linux is considered a
monolithic
kernel. This is different from Minix, which Linux
started from, and other Unix-like implementations that use
micro
kernels. The differ‐
ence between a monolithic kernel and a micro kernel is that all functionality is built
into a monolithic kernel. This includes any code necessary to support hardware devi‐
ces. With a micro kernel, only the essential code is included in the kernel. This is
roughly the bare minimum necessary to keep the operating system functional. Any
additional functionality that is required to run in kernel space is implemented as a
module and loaded into the kernel space as it is needed. This is not to say that Linux
doesn’t have modules, but the kernel that is typically built and included in Linux dis‐
tributions is not a micro kernel. Because Linux is not designed around the idea that
only core services are implemented in the kernel proper, it is not considered a micro
kernel but instead a monolithic kernel.
Linux is available, generally free of charge, in distributions. A Linux
distribution
is a
collection of software packages that have been selected by the distribution maintain‐
ers. Also, the software packages have been built in a particular way, with features
determined by the package maintainer. These software packages are acquired as
source code, and many packages can have multiple options—whether to include data‐
base support, which type of database, whether to enable encryption—that have to be
enabled when the package is being configured and built. The package maintainer for
one distribution may make different choices for options than the package maintainer
for another distribution.
Different distributions will also have different package formats. As an example, Red‐
Hat and its associated distributions, like RedHat Enterprise Linux (RHEL) and
Fedora Core, use the RedHat Package Manager (RPM) format. In addition, RedHat
uses both the RPM utility as well as the Yellowdog Updater Modified (yum) to man‐
age packages on the system. Other distributions may use the different package man‐
agement utilities used by Debian. Debian uses the Advanced Package Tool (APT) to
manage packages in the Debian package format. Regardless of the distribution or the
package format, the object of the packages is to collect all the files necessary for the
software to function and make those files easy to put into place to make the software
functional.
|
| |
Pedagogika fakulteti - bet 51

Sоеdinit – Tutashtirish buyrug’i
Tahrirlash buyrug’i xususiyatlari o’zaro mos ob’yektlarni bitta ob’yektga aylantirishni nazarda tutadi. Ya’ni ob’yektlar majmuasi tutashtirilib, bitta ob’yekt deb qabul qilinadi. Kesmani kesmaga, aylana yoyini aulana yoyiga yoki lekalo chizig’ini lekalo chizig’i bilan tutashtirilishi mumkin.
Bunda qo’yiladigan asosiy shart ob’yektlar bir tekislikda va bir yo’nalishda bo’lishi lozim. Bir kesma yonalishidagi ikkinchi kesma o’zaro tutashtirilishi, aylana segmenti uning radiusi va markaziga mos boshqa segment bilan bir butun aylana yoyini yoki to’liq doirani hosil qilishi mumkin. Xususiyatli va lekalo chiziqlar esa aynan shunday ob’yektlar bilan biron bir uchi orqali tutash bo’lsa ular payvand etiladi.
Tahrirlash ketma – ketligi:
I usul: Tahrirlash panelidagi «Sоеdinit» - Tutashtirish buyruq piktogrammasi tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Ob’yektlar tanlanib “Enter” tugmasi bosiladi.
II usul:
Dastlabki tutashtirish ob’yekti tanlanadi.
Tahrirlash panelidagi «Sоеdinit» - Tutashtirish buyruq piktogrammasi tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Tutashtiriladigan ob’yektlar sichqoncha ko’rsatkichi bilan tanlanib “Enter” tugmasi bosiladi.
|
| Chapter 1: Foundations of Kali Linux

File and Directory Management
To start, let’s talk about getting the shell to tell you the directory you are currently in.
This is called the
working directory
. To get the working directory, the one we are cur‐
rently situated in from the perspective of the shell, we use the command
pwd
, which
is shorthand for
print working directory
. In
Example 1-1
, you can see the prompt,
which ends in #, indicating that the effective user who is currently logged in is a
superuser. The # ends the prompt, which is followed by the command that is being
entered and run. This is followed on the next line by the results, or output, of the
command.
Example 1-1. Printing your working directory
root@rosebud:~#
pwd
/root
When you get to the point where you have multiple machines,
either physical or virtual, you may find it interesting to have a
theme for the names of your different systems. I’ve known people
who named their systems for
The Hitchhiker’s Guide to the Galaxy
characters, for instance. I’ve also seen coins, planets, and various
other themes. For ages now, my systems have been named after
Bloom County
characters. The Kali system here is named for Rose‐
bud the Basselope.
Once we know where in the filesystem we are, which always starts at the root direc‐
tory (/) and looks a bit like a tree, we can get a listing of the files and directories. You
will find that with Unix/Linux commands, the minimum number of characters is
often used. In the case of getting file listings, the command is
ls
. While
ls
is useful, it
only lists the file and directory names. You may want additional details about the
files, including times and dates as well as permissions. You can see those results by
using the command
ls -la
. The
l
(ell) specifies
long
listing, including details. The
a
specifies that
ls
should show
all
the files, including files that are otherwise hidden.
You can see the output in
Example 1-2
.
Example 1-2. Getting a long listing
root@rosebud:~# ls -la
total 164
drwxr-xr-x 17 root root 4096 Nov 4 21:33 .
drwxr-xr-x 23 root root 4096 Oct 30 17:49 ..
-rw------- 1 root root 1932 Nov 4 21:31 .ICEauthority
-rw------- 1 root root 52 Nov 4 21:31 .Xauthority
-rw------- 1 root root 78 Nov 4 20:24 .bash_history
-rw-r--r-- 1 root root 3391 Sep 16 19:02 .bashrc
Heritage of Linux - Learning Kali Linux

dollars. As a point of comparison, a $7 million system today (at the time of this writ‐
ing, in late 2017) would have cost about $44 million then. Having a system that could
support only a single user at a time was just not cost-effective—thus the development
of
Multics by MIT, Bell Labs, and GE was a way of making computers more cost-
effective.
Inevitably, the project slowly fell apart, though the operating system was eventually
released. One of the programmers assigned to the project from Bell Labs returned to
his regular job and eventually decided to write his own version of an operating sys‐
tem in order to play a game he had originally written for
Multics but wanted to play
on a PDP-7 that was available at Bell Labs. Ken Thompson needed a decent environ‐
ment to redevelop the game for the PDP-7. In those days, systems were largely
incompatible. They had entirely different hardware instructions (operation codes),
and they sometimes had different memory word sizes. As a result, programs written
for one environment, particularly if very
low-level languages were used, would not
work in another environment. The resulting environment, developed by a program‐
mer to make his life easier as he was getting Space Travel working on the PDP-7, was
named Unics. Eventually, other Bell Labs programmers joined the project, and it was
eventually renamed Unix.
Unix had a simple design. Because it was developed
as a programming environment
for a single user at a time, it ended up getting used, first within Bell Labs and then
outside, by other programmers. One of the biggest advantages to Unix over other
operating systems was that the kernel was rewritten in the C programming language
in 1972. Using a higher-level
language than assembly, which was more common then,
made it portable across multiple hardware systems. Rather than being limited to the
PDP-7, Unix could run on any system that had a C compiler in order to compile the
source code needed to build Unix. This allowed for a standard operating system
across numerous hardware platforms.
In addition to having a simple design, Unix had the advantage
of being distributed
with the source code. This allowed researchers not only to read the source code in
order to understand it better, but also to extend and improve the source. Unix has
spawned many child operating systems that all behaved just as Unix did, with the
same design.
In some cases, these other operating system distributions started with
the Unix source that was provided by AT&T. In other cases, Unix was essentially
reverse engineered based on documented functionality and was the starting point for
two popular Unix-like operating systems: BSD and Linux.
Razо - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 50/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
Razоrvat – Uzish buyrug’i
Tahrirlash buyrug’i ob’yektda uzilish hosil qiladi. Ya’ni ikkita nuqtada uzib oraliq ob’yektni olib tashlaydi. Ushbu tahrirlash buyrug’i barcha ob’yektlarda uzilish hosil qila oladi.
Tahrirlash ketma – ketligi:
Tahrirlash panelidagi «Razоrvat» - Uzish buyruq piktogrammasi tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Ob’yektdagi uzilish hosil qilinadigan birinchi nuqta tanlanadi.
Ob’yektdagi uzilish hosil qilinadigan ikkinchi nuqta tanlanadi.
Izoh: Aylana va ellipslarda uzilish hosil qilishda soat strelkasiga teskari yo’nalish e’tiborga olinishi lozim. Ya’ni birinchi nuqta tanlangandan so’ng ikkinchi nuqtagacha bo’lgan oraliqdagi yoy soat strelkasiga teskari yo’nalishda yo’qoladi.
|
| |
Application Server - Learning Kali Linux

functions described here, where each individual server may carry multiple functions
rather than a single function. The application server may coexist with the web server,
for instance. The implementation will be dependent on the needs of the application.
Application servers also take in HTTP and will generate HTML to be sent back out.
There may also be communication using XML between the client and the application
server. XML is a way of bundling up data to either be sent
to the application server or
for data to be presented to the application. The application server will commonly be
language dependent. It may be based in Java, .NET (C# or Visual Basic), or even
scripting languages like Go, Ruby, or Python. In addition to the programming lan‐
guage used to perform the business functions and
generate the presentation code, the
application server would also need to speak whatever language the data is stored in
(SQL, XML, etc.).
The application server implements the business logic, which means it handles the
critical functioning of the application, determining what to present to the user. These
decisions are commonly based on information provided
by the user or stored on
behalf of the user. The data stored may be stored locally or, perhaps more commonly,
using some sort of backend storage mechanism like a database server. The application
server would be responsible for maintaining any state information since HTTP is a
stateless
protocol, meaning every request from a client is made in isolation without
other mechanisms helping out.
An application server will commonly have the application in a prebuilt state rather
than in source code form. This would be different, of course,
if the application server
were based on a scripting language. While those languages may be compiled, they are
often left in their text-based form. If an application server were to be compromised,
the functionality of the server could be manipulated if the source code were in place.
Worse than that, however, the application server is the gateway to sensitive informa‐
tion. This would be entirely
dependent on the application, but the application server
would be responsible for retrieving and manipulating any data for the application.
The application then needs to be able to get access to the data, wherever it’s stored.
This means it knows where files may be or it would need credentials to any database
server that is used. Those credentials could be grabbed and used to gain direct access
to the data if the application server were to be compromised.
Database Server
The
database server
is where the crown jewels are stored. This, again, is entirely
dependent on the application. The crown jewels may
be inventory for a business,
where a user could determine whether a business sells a particular product, or they
may be credit card information or user credentials. It would depend entirely on the
purpose of the application and what the business determined was important to be
stored.
This is persistent storage, though a server that sat in the middle of the infor‐
| Chapter 8: Web Application Testing

on. Not all attacks, though, are injection attacks. Other attacks use headers or are a
result of a form of social engineering, where the expectation is the user won’t
notice
something is wrong while it’s happening. Following are explanations of some of the
common web attacks, so you will have a better idea of what is being tested when we
start looking at tools a little later.
As you are looking
through these attack types, keep the target of the attack in mind.
Each attack may target a different element of the entire application architecture,
which means the attacker gets access to different components with different sets of
data to achieve different results. Not all attacks are created equal.
SQL Injection
It’s hard to count the number of web applications that
use a database for storage, but
as a proportion, it’s likely large. Even if there is no need for persistent storage of user
information, a database could help to guide the application in what is presented. This
may be a way of populating changing information without having to rewrite code
pages. Just
dump content into the database, and that content is rendered when a user
comes calling. This means that if you are looking to attack a web application, espe‐
cially one where there is significant interaction with the user, there is probably a data‐
base behind it all, making this a significant concern when testing the application.
Structured Query Language (SQL) is a standard way of issuing
queries to relational
databases. It has existed in one form or another for decades and is a common lan‐
guage used to communicate with the databases behind the web application. A com‐
mon query to a database, looking to extract information, would look something like
"SELECT * FROM mydb.mytable WHERE userid = 567"
.
This tells the SQL server to
retrieve all records from the
mytable
in the
mydb
database where the value in the col‐
umn named
userid
is equal to
567
. The query will run through all of the rows in the
database looking for matching results. The results will be
returned in a table that the
application will have to do something with.
If you are working with a web application, though, you are probably not using con‐
stant values like 567. Instead, the application is probably using a variable as part of
the query. The value inside the variable is inserted into the query just before the
query is sent off to the database server. So, you might have something like
"SELECT *
FROM mydb.mytable WHERE username = '",
username, "';"
. Notice the single
quotes inside the double quotes. Those are necessary to tell the database server that
you are providing a string value. The value of the variable username would be inser‐
ted into the query. Let’s say, though, that the attacker were to input something like
'
OR '1' = '1
. This means the query being passed into the server would look like this:
"SELECT * FROM mydb.mytable WHERE username = '' OR '1' = '1';"
.
Web-Based Attacks | 249 - Learning Kali Linux

This
would complete the
whois
command being run with the domain name
wub‐
ble.com
. The delimiter then says, “wait a second, I have another command to run
after the first one is finished.” So, the operating system will also run the next com‐
mand. All of the output from both would be fed back to
the page being presented to
the user. This would show the
whois
output but also the contents of the
/etc/passwd
file.
This attack targets the server that processes whatever system command is meant to be
run. Any command that can be executed by the user that owns the process can be
passed in. This means an attacker can gain control of the system. This is probably the
web server, but it could be the application server as well.
Cross-Site Scripting
So far, the attacks have been focused on the server side. Not all attacks, though, are
focused on the servers or the web infrastructure that houses the application. In some
cases, the target is the user or something that the user has. This is the case with cross-
site scripting.
Cross-site scripting
is
another injection attack, but in this case, the injec‐
tion is a scripting language that will be run within the context of the user’s browser.
Commonly, the language used is JavaScript since it’s reasonably universal. Other
scripting languages that can be run inside a browser, like Visual Basic Script
(VBScript), may also be used, though they may be platform dependent.
There are two types of cross-site scripting attack. One is
persistent
.
A persistent cross-
site scripting attack stores the script on the web server. Don’t be confused by this,
however. Just because the script is stored on the web server doesn’t mean that the web
server is the target. The script is no more run on the server than HTML is. In each
case, the browser processes the language. With HTML, the
language tells the browser
how to render the page. With something like JavaScript, the script can get the
browser to do anything that the language and the browser context allows. Some
browsers implement something like a sandbox in order to contain any activity.
With persistent cross-site scripting, the attacker finds a website that allows for the
storage and subsequent retrieval and display of data provided by the user. When that
happens, the attacker can load a script into the server that
will be displayed to users
who later visit the page. This is a good way to easily attack several systems. Anyone
visiting the page will run the script, performing whatever function the attacker wants.
A simple way to test for a cross-site scripting vulnerability is to load something like
into a field that leads to persistent storage. An early
avenue of attack was discussion forums. The attacker could
load up a forum with an
attack and wait for people to come visit.
The thing about this, though, is that you may think an easy mitigation is to just block
the characters < and >. That keeps the tags from being stored and interpreted later as
Web Architecture | 245 - Learning Kali Linux

mation flow between the database and the client could
get temporary access to the
data as it passes through. The easiest place to get access to the data, though, is at the
database.
One of the challenges with databases is that if an attacker can either pass requests
through to them or can get access
to the database server itself, the data could be com‐
promised. Even if the data were encrypted in transmission or encrypted on disk, the
data could be stolen. If an attacker can access credentials that the application server
needs to access the data, the attacker could similarly access
data in the database by
querying it. Once a user has been authenticated to the database server, it’s irrelevant
that the data is encrypted anywhere because it has to be decrypted by the database
server in order to be presented to the requestor.
Because of the possible sensitivity of the information in the
database and the potential
for it to be compromised, this server is probably high on the list of key systems, if not
at the very top. Because of that, other mechanisms may be
in place to better protect
this system. Any of the elements within the architecture can expose the data that’s
stored on this system, so ideally mechanisms are in place on all of them to ensure that
the data is not compromised. The data stored here is a common target of the different
web-based attacks, but it is not the only target.
Web-Based Attacks
Because so many websites today have programmatic elements
and the service is often
exposed to the open internet, they become nice targets for attackers. Of course,
attacks don’t have to come in the shape of sending malicious data into the application,
though those are common. There are other ways of getting what the attacker is look‐
ing for. Keep in mind that the motivation is not always the same. Not every attacker is
looking to get complete access to the database. They may not
be looking to get a shell
on the target system. Instead, there may be other motivations for what they are doing.
As the canvas for developing web applications expands with more frameworks, more
languages and more helper protocols and technologies, the threat increases.
One of the most impactful breaches to date—the Equifax data
breach—was caused as a result of a framework
used to develop the
website. A vulnerability in that framework, left unpatched long
after the issue had been fixed and announced,
allowed the attackers
in where they were able to make off with the records of about 148
million people.
Often, attacks are a result of some sort of injection attack: the attacker sends mali‐
cious input to the application, which treats it as though it were legitimate. This is a
result of a problem with data validation; the input wasn’t
checked before it was acted
Masshtab – Masshtab buyrug’i

|
Masshtab – Masshtab buyrug’i
|
bet | 46/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
Masshtab – Masshtab buyrug’i
Tahrirlash buyrug’i ob’yektlarni masshtab asosida kattalashtirish yoki kichraytirishni nazarda tutadi. AutoCAD dasturi ob’yekt (ob’yektlar) o’lchamlarini katta yoki kichiklashtirishda ma’lum bir koeffisientga ko’paytirishni nazarda tutadi. Agarda koeffisiyent 1 dan katta bo’lsa kattalashadi. 0 va 1 qiymati orasida bo’lsa kichiklashadi. Buni yodda tutish lozim.
Izoh: Misol uchun 1.5; 2; 2.5… - kattalashtirish masshtabi.
0.1; 0.5; 0.8… - kichraytirish masshtabi.
Tahrirlash ketma – ketligi:
I usul:
Ob’yekt (Ob’yektlar) sichqoncha yordamida tanlanadi.
Tahrirlash panelidagi «Masshtab» - Masshtab buyruq piktogrammasi tanlanadi.
Ekranga «Bazоvaya tоchka» - Bazaviy nuqta axboroti chiqadi.
Ekranda asosiy nuqta baza sifatida tanlanadi.
Ekranga «Masshtab ili ↓» - Masshtab yoki ↓ axboroti chiqadi.
Klaviaturadan qiymat kiritilib, “Enter” tugmasi orqali tasdiqlanadi. Masshtab bajariladi.
II usul:
Ob’yekt (Ob’yektlar) sichqoncha yordamida tanlanadi.
Tahrirlash panelidagi «Masshtab» - Masshtab buyruq piktogrammasi tanlanadi.
Ekranga «Bazоvaya tоchka» - Bazaviy nuqta axboroti chiqadi.
Ekranda asosiy nuqta baza sifatida tanlanadi.
Ekranga «Masshtab ili ↓» - Masshtab yoki ↓ axboroti chiqadi.
Klaviaturadan ↓ ko’rsatkichi tanlanib, qo’shimcha menu chaqiriladi. Unda «Kоpiya» - Nusxa va «Оpоrniy оtrеzоk» - Tayanch kesma bandlari mavjud.
|
| |
«Kоpiya» - Nusxa - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 47/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
«Kоpiya» - Nusxa bandi mashtab amalga oshirilgandan so’ng dastlabki ob’yekt (ob’yektlar)ni saqlab qolishni nazarda tutadi. Ushbu band tanlangandan so’ng qiymat kiritilishi mumkin.
«Оpоrniy оtrеzоk» - Tayanch kesma bandi tanlansa biron bir kesma uzunligida masshtab bajarilishi nazarda tutiladi va ushbu kesma nuqtalari ko’rsatilishi talab etiladi.
Rastyanut – Cho’zish buyrug’i
Ushbu tahrirlash buyrug’i ob’yektlarni cho’zish yoki qisqartirishni nazarda tutadi.
Tahrirlash ketma – ketligi:
Ob’yekt (Ob’yektlar) sichqoncha yordamida yashil dinamik ramka asosida tanlanadi.
Bunda ramka hududiga to’liq kirgan ob’yektlar cho’zilmasdan to’liq ko’chirilishi, ramka hududiga yarimi kiritilgan ob’yektlar esa cho’zilishi e’tiborga olinishi kerak.
Izoh: Qo’llanmaning Ob’yekt va ob’yektlarni tanlash bo’limini ko’rib chiqing.
Tahrirlash panelidagi «Rastyanut» - Cho’zish buyruq piktogrammasi tanlanadi.
Ekranga «Bazоvaya tоchka» - Bazaviy nuqta axboroti chiqadi.
Ekranda asosiy nuqta baza sifatida tanlanadi.
Bazaviy nuqtaga asosan sichqoncha yordamida ikkinchi nuqtaga siljish amalga oshiriladi. Ob’yektlar cho’ziladi yoki qisqaradi.
|
| |
Razо - Pedagogika fakulteti

|
Pedagogika fakulteti
|
bet | 49/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
Razоrvat v tоchkе – Bir nuqtada uzish buyrug’i
Ushbu tahrirlash buyrug’i ob’yektni bitta nuqtada uzib ikkita ob’yekt hosil qilishni nazarda tutadi. Tahrirlash buyrug’i aylana va ellipslardan boshqa barcha ob’yektlarni ikkita ob’yektga ajrata oladi.
Tahrirlash ketma – ketligi:
Tahrirlash panelidagi «Razоrvat v tоchkе» - Bitta nuqtada uzish buyruq piktogrammasi tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Uziladigan ob’yekt sichqoncha yordamida tanlanadi.
Sichqoncha ko’rsatkichi yordamida ob’yektning uzilish nuqtasi tanlanadi.
Ob’yekt ikkita aloxida ob’yeftga bo’linadi.
|
| |
Оbrеzat – Qirqish buyrug’i

|
Оbrеzat – Qirqish buyrug’i
|
bet | 48/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
Оbrеzat – Qirqish buyrug’i
Ushbu tahrirlash buyrug’i ob’yekt yoki ob’yektlarning ma’lum bir qismini qirqib tashlashni nazarda tutadi.
Ob’yektlar to’g’ri chiziq boyicha kesilishi talab etilsa dastlb ushbu kesuvchi chiziq ob’yektlar ustidan o’tkazilishi lozim.
Tahrirlash ketma – ketligi:
Kesuvchi ob’yekt yoki to’g’ri chiziq tanlanadi.
Tahrirlash panelidan «Оbrеzat» - Qirqish buyruq piktogrammasi tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Ob’yektlarning qirqiladigan qismlari sichqoncha yordamida tanlab chiqiladi.
Udlinit – Uzaytirish buyrug’i
«Udlinit» - Uzaytirish tahrirlash buyrug’i ob'yekt yoki ob’yektlarni boshqa bir chegara ob’yekt yoki ob’yektlargacha uzaytirishni nazarda tutadi.
Tahrirlash ketma – ketligi:
Uzaytiruvchi chegara ob’yekt yoki to’g’ri chiziq tanlanadi.
Tahrirlash panelidan «Udlinit» - Uzaytirish buyrug’i tanlanadi.
Sichqoncha ko’rsatkichi ob’yektlarni tanlash rejimiga o’tadi.
Uzaytiriladigan ob’yektlar sichqoncha yordamida tanlab chiqiladi.
|
| |
«Tеkst» - Matn taxrirlash paneli

|
«Tеkst» - Matn taxrirlash paneli
|
bet | 13/54 | Sana | 24.03.2021 | Hajmi | 5,98 Mb. | | #13476 |
2.2. «Tеkst» - Matn taxrirlash paneli.
Ushbu panelning asosiy funksiyasi matn yaratish va mavjud matnlarni tahrirlashdan iboratdir. Panelda bir qator ma’lum bir funksiyalarga ega bo’lgan interaktiv tugmalar mavjud.
«Mnоgоstrоchniy» - Ko’p qatorli matn kiritish.
«Оdnоstrоchniy» - Bir qatorli matn kiritish.
«Rеdaktirоvat» - Tahrirlash.
«Nayti» - Qidirish.
«Tеkstоviе stili» - Matn turlari.
«Masshtab» – Masshtab.
«Viravnivaniе» - Tekislash.
«Prеоbrazоvat v еdinitsi drugоgо prоstranstva» - Boshqa muxit o’lchov birligiga o’tkazish.
«Mnоgоstrоchniy» - Ko’p qatorli matn kiritish.
Usbu faol tugma tanlanganda sichqoncha ko’rsatkichi matn kiritiladigan hududning dastlabki satrini bosh vaziyatini, tanlangandan so’ng esa oxirgi satrning matn tugatiladigan joyini belgilab berishni so’raydi. Ya’ni matn kiritiladigan hududni to’g’ri to’rtburchak shaklida yuqori chap burchagini va pastki o’ng burchagini belgilab berishni so’raydi. Ushbu jarayon bajarilgandan so’ng ekranda matnni kiritish uchun «Fоrmat tеksta» qo’shimcha axborot oynasi ishga tushadi. Ushbu oynadagi aksariyat faol tugmalar bizga WINDOWSning boshqa dasturlaridan tanish. Quyida bizga notanish bo’lgan faol tugmalar funksiyasi bilan tanishib chiqsak.
Bosh harflarni kichik harflarga va kichik harflarni bosh harflarga o’giradi.
Kiritilayotgan matn ustida chiziq chizib borilishini ta’minlaydi.
|
| |