domingo, abril 29, 2012

theHarvester

Ferramenta muito interessante, com ela é possível obter informações tais como: e-mails, hosts etc, testei a ferramenta e fiquei impressionado com os resultados, vale a pena conferir, uma ferramenta muito interessante para obtenção de informações acerca do "alvo" ferramenta importante para o profissional da segurança da informação.

Link da ferramenta:

A ferramenta é um script Python, abaixo um exemplo? 
#./theHarvester.py -d alvo.com -l 100 -b google

theHarvesteer.py é a ferramenta, -d especifica o alvo, -l o número de resultados, -b o "repositorio" que neste caso seria o google, mas há outros como Bing, PGP, LinkedIn etc.





quinta-feira, abril 26, 2012

Erro webhttrack

Ao iniciar o webhttrack (utilizados para copiar o conteúdo de sites para a máquina local) ocorria o seguinte erro:

/usr/local/bin/htsserver: error while loading shared libraries: libhttrack.so.2: cannot open shared object file: No such file or directory
/usr/local/bin/webhttrack(17147): could not spawn htsserver

Solução, criar um link símbolico:
#ln -s /usr/local/lib/libhttrack.so.2 /usr/lib/libhttrack.so.2
Para ler novamente as bibliotecas
#ldconfig
Iniciando o webhttrack
#webhttrack

quarta-feira, abril 25, 2012

LPI Level 1 Exame 102

Hoje realizei a prova LPI Exam 102, foram 60 questões, obtive 730 de 800 possíveis, agora sou Linux LPIC-1.

domingo, abril 15, 2012

Adicionando Memória\CPU em máquina virtual em execução

Uma feature interessante disponível no vSphere (introduzido na versão 4) é a possibilidade de adicionar memória\cpu em máquinas em execução, para isso basta editar as propriedades da máquina e habilitar as opções (por padrão vem desabilitado), conforme print (Edit Settings - Aba Options ):


A adição de memória\cpu em máquinas execução não é suportado por todos os sistemas operacionais, informações sobre compatibilidade podem ser encontradas aqui. Também é necessário possuir licença para permitir essa operação.




sexta-feira, abril 13, 2012

Erros replicação

Ocorria o seguinte erro na replicação entre dois DCs, Win 20008 R2 e Win 2003 R2.
Event Source: NtFrs
Event ID: 13559
Description:
The File Replication Service has detected that the replica root path has changed from "c:\windows\sysvol\domain" to "c:\windows\sysvol\domain". If this is an intentional move then a file with the name NTFRS_CMD_FILE_MOVE_ROOT needs to be created under the new root path.
This was detected for the following replica set:
"DOMAIN SYSTEM VOLUME (SYSVOL SHARE)"

Verificando no Debug %Windir%\debug arquivo NtFrs_0003.log:
ERROR Command file not found at the new root c:\windows\sysvol\domain\NTFRS_CMD_FILE_MOVE_ROOT. Can not move root.

Para resolver este problema bastou criar um arquivo "NTFRS_CMD_FILE_MOVE_ROOT" no caminho solicitado: c:\windows\sysvol\domain sem conteúdo, após isso reiniciar o serviço de replicação, e o problema foi resolvido.

sexta-feira, abril 06, 2012

Network – Configuration Files

/etc/hosts : Mapping between IP address and names and is used for name resolution.
Ex: 10.10.8.163 slackware.mydomain slackware
---
/etc/nsswitch.conf: System Databases and Name Service Switch configuration file .Use by various system library. /etc/nsswitch.conf fle supersedes /etc/host.conf
Ex:
root@slack:~# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#

# passwd: files nis
# shadow: files nis
# group: files nis

passwd: compat
group: compat

hosts: files dns
networks: files

services: files

---
/etc/host.conf : This file controls name resolution sources for pre-glibc2 system.
Ex:
root@slack:~# cat /etc/host.conf
order hosts, bind
multi on

---
/etc/resolv.conf: Resolver configuration file. Provide access to DNS.
Ex:
search mydomain
nameserver 10.10.1.2 # DNS Server
nameserver 10.10.1.3 # DNS Server

--

/etc/networks: Network name information.
Ex:
root@slack:~# cat /etc/networks
#
# networks This file describes a number of netname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
#

loopback 127.0.0.0
localnet 127.0.0.0
mylan 10.10.0.0
--

sexta-feira, março 16, 2012

Impedir usuários de efetuarem logon - Linux.

Para impedir usuários efetuarem logon em um sistema Linux basta criar o arquivo nologin em \etc, assim somente o usuário root poderá efetuar login.
Ex:

root@debian:~# touch /etc/nologin
root@debian:~# login
debian login: maykon

Login incorrect
debian login:
------------------
Não obetive sucesso ao tenta efetuar login com o usuário maykon, só depois de remover o arquivo nologin que foi possível o acesso.

root@debian:~# rm /etc/nologin
root@debian:~# login
debian login: maykon
Password:
Last login: Fri Mar 16 13:33:41 BRT 2012 on pts/0
Linux debian 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
maykon@debian:~$

terça-feira, março 13, 2012

Command chage

chage - change user password expiry information.

Information root.
#chage -l root

-M option maxdays is the maximum number of days during which a password is valid, 0 user maykon will be required to change password.
#chage -M 7 maykon

-W set the number of days of warning before a password change is required.
#chage -W 7 maykon

Ex:
root@slack:~# login
slack login: maykon
Password:
Linux 2.6.29.6-smp.
Last login: Tue Mar 13 09:36:16 -0300 2012 on pts/0.
Your password will expire in 7 days.
No mail.
maykon@slack:~$

-E set a date on which the user's account will no longer be accessible, this option is the number of days since January 1, 1970.
#chage -E 8 maykon
Account Expires: Jan 09, 1970 ;-).

sexta-feira, março 09, 2012

Manage User and Group

Create de account maykon, -m create home directory, -s shell
#useradd -m maykon -s /bin/bash

Modify user account, -L Lock password, -U Unlock.
#usermod -L maykon

Delete account, -r delete home directory.
#usedel -r maykon

Add group to the system.
# groupadd centipede

Modify group, change name centipede for centipede2
#groupmod -n centipede2 centipede

Delete group
#groupdel centipede2

Set password
#passwd user

Command is used to administer groups, add root for group centipede
#gpasswd -a root centipede

User\Group account and Password Files:

#/etc/passwd – Username, Password (hashed), User ID, Group ID, Full Name, Home Directory, Default Shell.

#/etc/group – Group Name, Group Password, Group ID, Group Member List.

#/etc/shadow – Shadow is a file which contains the password information for the system's.

#/etc/gshadow - file is readable only by the root user and contains an encrypted password for each group.

terça-feira, março 06, 2012

LPI Level 1 Exame 101

Hoje realizei o exame 101, foram 60 questões (pontuação 680), e consegui passar, agora é só estudar para a 102 que pretendo realizar em abril.