Tuesday, January 15, 2013

Adding Memory to a Solaris Zone on the fly

Well good morning and god bless everyone. This is a quick tutorial on how to Add memory to a Solaris Zone on the fly while its running without a reboot, Solaris Zones is some pretty cool technology well enough chatter from me lets get to it.

prctl, rcapadm can modify a running zone. and the zonecfg defines the resource parameters of the zone when it boots.

So in order to make changes dynamically you will have to do the following:
1. Update the zonecfg.
2. Use the prctl, rcapadm commands to modify the zone while it is online. make sure that everything matches the changes you've made to the zonecfg.

Below are the detail steps to add the capped-memory  to the running zone container.

zonecfg -z blah 

zonecfg:blah; select capped-memory
zonecfg:blah:capped-memory> info 
capped-memory:
physical: 1G
[swap: 2G]
[locked: 512M]
zonecfg:blah:capped-memory> set physical=2g
zonecfg:blah:capped-memory> set swap=3g

zonecfg:blah:capped-memory> info 
capped-memory:
physical: 2G
[swap: 3G]
[locked: 512M]
zonecfg:blah:capped-memory> end
zonecfg:blah> exit


Modify the zones running settings:

blah:/
# rcapadm -z blah -m 2048m

blah:/
# sleep 60

blah:/
# rcapstat -z 1 1 

blah:/
prctl -n zone.max-swap -v 3g -t privileged -r -e deny -i zone blah

Verify that the settings have taken effect

zlogin -C blah 

Then run the top command 

#top -c 

Well its about that time, i hope you enjoyed and really got something out of this tutorial. 
 until next time i wish you nothing but happiness and success. 

Monday, January 14, 2013

Java 7 Release Update 11

Good Morning hope everyone is having a great day. Well the Java 7 Security Vulnerability issue has finally been resolved with the release of Java 7 update 11. Java update 10 and earlier has an big security hole that allows the attacker to remotely exploit a system without the need for a username and password. To be successfully exploited, an unsuspecting user running an affected release in a browser will need to visit a malicious web page that leverages these vulnerabilities. Successful exploits can impact the availability, integrity, and confidentiality of the user's system. With that being said please head over to http://www.java.com/en/download/manual.jsp to download the latest update.
Also Note: JDK and JRE 6, 5.0 and 1.4.2, and Java SE Embedded JRE releases are not affected. by this vulnerability.

Sunday, January 13, 2013

Understanding ZFS (Zpools)

Good Morning everyone hope everyone is enjoying the weekend, This is a quick tutorial on the zfs filesystem mainly focusing on zpools. But before jumping into command and how things work let me give you a little background on the zfs filesystem, ZFS which stands for Zetabyte File System is a 128bit filesystem that is also a volume manager rolled up in on. In reality this is the Sun Volume manager on steroids. With the Sun Volume Manager the admin had to use soft partitioning in order to expand disk space on the ufs filesystem, this is not so with the zfs filesystem. By simply adding a disk to the disk pool automatically adds disk space to the volume this is such a cool filesystem. Over time developers have ported zfs over to linux and freebsd which in my most humble opinion is the best OS(bsd) :). Well enough of this chatter let me show some of the cools stuff that zfs has to offer beginning with zpools. Zpools are the heart of the zfs filesystem , without zpools there is no zfs period, in order to use zfs you  will have to create a zpool by typing in the following command.

# zpool create (which in my case is nixpool :) )  

#zpool create nixpool c1t0d0s0


List all zpools 

# zpool status -xv 
all pools are healthy

Creating a mirrored zpool 

#zpool create nixpool mirror c0d0 c1d0

Creating a mirrored zpool with a hot spare#Note: These devices are not actively used in the pool, but when an active device fails, it is automatically replaced by a hot spare zfs rocks :).

#zpool create pool mirror c0d0 c1d0 spare c2d0 c3d0

Create a zpool with log devices. log devices come in handy sometimes for example databases often require their transactions to be a on a stable storage devices when returning from a system call. Multiple log devices can also be specified and they can be mirrored. 


# zpool create nixpool c0d0 c1d0 log c2d0 

Another cool thing about zpools is that their properties can be modified. you can get a list of zpool properties by running their following command:

# zpool get all testpool

Adding a Mirror to a Zfs Storage Pool Note: The following command addss two mirrored disks  to the 
pool nixpool, assuming the pool is already made up of two-way mirrors.

# zpool add nixpool mirror c1t0d0 c1t1d0


Destroying a zpool Note: the following command destroys the pool nixpool and any datasets contained within. 


# zpool destroy -f nixpool 

well this will conclude  the zpool tutorial, if you desire to know more about the zpool command. Please go through and read the man pages on your local unix system  

man zpool :).




Saturday, January 12, 2013

Automating Port Installs in Freebsd

Happy New Year Everyone, last year i did not do a good job in blogging and keeping things posted but  year im looking to do a better job with this blog site. Well i  Just spent most of my day messing around with freebsd and talking with a few people on irc who stated that they were having issue installing ports without have to answer any of the menu based questions. so i figured i would do a quick tutorial on automating the installation of ports of a freebsd system.  Well enough talking on this end lets get to it. 

Step1.  im going to assume that you already have the ports tree installed on the system, If you do not have the port tree installed you can do so with the following commands 

portsnap fetch 
portsnap extract 

for more information regarding the portsnap command please check out the man pages.

Step2. cd /usr/ports/mail/postfix  (or whatever port you are trying to install) 

Step3.  make config ( this will create a configuration file in the /var/db/ports/postfix directory) 

Step4. modify the config file if there is one and make all the changes that you would like to that file.

Step5. Once you are satisfied with your config file run the following command 

cd /usr/ports/mail/postfix; env BATCH=yes make install clean 

Note: This is the more cleaner way of automating port installation rather than putting the "BATCH = yes" into the /etc/make.conf file.


NOTE: This procedure has been tested on freebsd 8.2 so as far as i know this should work on other versions of freebsd.

Well thats all for right now. I'm to go watch a movie i hope someone gets something out of this tutorial. 



      

Cracking Kerberos Service Tickets (TGS) Using Kerberoasting

As of late I've been spending a lot of time researching and learning different techniques when it comes to attacking Active Directory En...