-

   rss_rss_hh_full

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 1

:


SecGen

, 20 2017 . 13:37 +
antgorka 13:37

SecGen

  • Tutorial


SecGen Metasploitable .
, . !

?


SecGen , ruby. Vagrant Puppet.

, Vagrant , , VirtualBox, VM Ware Amazon AWS. Vagrantfile. ISO- , .. Vagrant (box), .

Puppet , bash . Puppet . .pp. Puppet , , , , .

SecGen box Vagrant, Puppet , .

SecGen , , puppet- SecGen.


Ubuntu github. 64- Ubuntu 16.04.3, 2.5 RAM.



sudo apt-get install ruby-dev zlib1g-dev liblzma-dev build-essential patch virtualbox ruby-bundler vagrant imagemagick libmagickwand-dev exiftool

() ,

sudo apt-get install libpq-dev

github

git clone https://github.com/cliffe/SecGen.git



cd SecGen
bundle install

Ruby



,

ruby secgen.rb --help






SecGen, .

ruby secgen.rb run

Vagrant box-, SecGen



Vagrant ,



SSH 2222. , SecGen , rsync .



, , , , , , rsync. , SecGen build-vms.

Puppet







virtualbox ,





SecGen, , projects, scenarios modules.



projects, , , . .

ruby secgen.rb --project home/user/SecGen/projects/SecGen20170920_1154 build-vms

,

ruby secgen.rb list-projects





build-project, Vagrant Puppet, .



SecGen , . scenarios XML . default_scenario.xml





	
	
		storage_server
		

		
		

		

		
	


, Linux, remote local. .. .

, SecGen, any_random_vulnerability.xml. scenarios/examples.
scenarios/security_audit scenarios/ctf.
CTF SecGen.



, . modules

  • bases
  • build
  • encoders
  • generators
  • networks
  • services
  • utilities
  • vulnerabilities


, smb, webapp, bash, ftp ..





secgen_metadata.xml .





  chkrootkit 0.49 privilege escalation
  Thomas Shaw
  MIT
  
    chkrootkit 0.49 and earlier contain a local privilege escalation vulnerability allowing a non-root user to place a
    script in /tmp that will be executed as root when chkrootkit is run. This module adds a cronjob to run chkrootkit
    periodically for exploitability.
  

  privilege_escalation
  root_rwx
  local
  linux
...

manifes puppet configure.pp, init.pp install.pp
files . chkrootkit-0.49.tar.gz



, scenario.xml, , .

XML vulnerability,
modules/vulnerabilities/unix/misc/distcc_exec Distcc has a documented security weakness that enables remote code execution modules/vulnerabilities/unix/desktop/xfce_lightdm_root_login Configures XFCE w/ LightDM to automatically login as root without a password\.

, , .

.vagrant, , , SSH vagrant. private_key.



ssh vagrant@127.0.0.1 -p 2222 -i private_key



ifconfig

eth0      Link encap:Ethernet  HWaddr 08:00:27:86:1c:fb  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe86:1cfb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:125254 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13570 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:177651061 (169.4 MiB)  TX bytes:1034124 (1009.8 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:83:ea:5e  
          inet addr:172.28.128.3  Bcast:172.28.128.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe83:ea5e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3130 (3.0 KiB)  TX bytes:2304 (2.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



IP .





sudo nmap -n -Pn -p- 172.28.128.3



distcc.


, . SecGen . , SecGen , , .
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/338274/

:  

: [1] []
 

:
: 

: ( )

:

  URL