Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Wednesday, February 12, 2014

Keep users happy: Don`t call them users.

,
Sysadmin blog A common complaint about IT staff is their lack of social skills. As in any industry that attracts a certain type of person, there's a high percentage of dark-room-dwelling people who can sometimes struggle to communicate. This is either through what they say or how they interact with others.
Not all IT people are like this of course, just as nurses are not all popping out of their skimpy outfits and pool cleaners don't universally have a mustache and manage to find themselves in many interesting and awkward situations.


There are some guidelines I can recommend based on many years of personal experience, as well as observing others.
Helpdesk 101: Never trust the user. When a user tells you something is happening, see it for yourself. Think of this situation as if they just watched a doctor perform brain surgery, then had to summarise what happened. They're going to make guesses and assumptions on the bits they don't understand. Once you see the issue for yourself, then start the troubleshooting. There is no point spending hours chasing a dragon to slay if the dragon turns out to be a funny-shaped rock. Ask to see that error message or recreate the issue.
Don't call them 'users': IT staff can often forget they're in a position of service. Nobody likes getting bad service; it doesn't matter if it's the 15-year-old at your local fast food restaurant or a rude doctor. This means respecting every person you deal with. "User" is a technical word and should not be used outside of technical circles - people want to feel like people. Generally I would recommend calling them "staff" for internal people, and "clients" for external people – a good guide is to use the same term as other departments with their communications.
Turn a "no" into an alternative solution: Everyone gets questions that should receive a negative answer, but when someone reaches out for help, that's the last thing they want to hear. "Can I plug in my personal laptop and use it at work?" usually comes under that category. The answer should be an alternative solution to their problem. Maybe they can do everything over the internet from that laptop, or they just need to get some files off, which could be done via USB storage.
Often people will ask for something they think is the best solution to their problem, which means more questions need to be asked to find out what they are actually trying to accomplish.
Good communication: Keep people updated. Let them know someone is working on their issue. Let everyone know of outages and resolutions by whatever notification method works the best. Check if people want more assistance, or to be left alone. Follow-ups should always be done; all users should be notified somehow that their issue or request has been addressed.
Adaptation: Some users want to know every intricate detail about their brand new laptop and how to use all the fancy new options. Others will want the laptop left on their desk without a word. Part of adaptation is reading people and asking the right questions, and the other half is leading them down the path that actually helps them more.
You can't hassle that person who wants to be left alone, but if there's one important nugget of information, you need to get that across somehow. Just wiping your hands clean and walking away won't help: if they don't know their password was reset, they'll just get angry and think you're useless at your job.
This might all sound like common sense to many, but it takes a lot of time to build up trust with your userbase, while only a few slip-ups can completely destroy it. You're there to assist the business, and that often doesn't align with an individual's particular request, but part of your job should be to keep both sides happy.

Read more →

Thursday, December 5, 2013

How to generate entropy in few easy steps

,
You will possibly need this for a PGP key.. So how to generate entropy through a secure shell connection in an easy way?
You don`t have to smash the keyboard or move the mouse and stuff...

Install haveged, a simple entropy deamon.
apt-get install haveged
then type in -w with your bits:
haveged -w 4096
Now you can re-start your PGP-key entropy gatherer in order to finish quickly, right after it's done, you might consider removing haveged as i did.
apt-get remove haveged
Easy eh?
Read more →

Friday, November 8, 2013

Watch live tasks running on remote pc

,
This will work only if you have pstools installed on both of computers.

@echo off
set /p comp=Type IP or HOSTNAME:
echo.
IF "%comp%"=="" GOTO Error
c:\pstools\pslist \\%comp% -s
echo.
pause
GOTO End
:Error
echo No IP inserted.
echo.
pause
:End
 Save it as batch file and run it.
Read more →

Saturday, November 2, 2013

Image to disk and vice versa on unix

,

Backup all your usb drivers or your disk drivers, or clone them using dd, the ultimate tool.
We will first list all our available disks, watching out not making any mistake.
fdisk -l
Then after the output, notice the /dev/sdA or /dev/hdA or /dev/sdB etc, take a note on what device you want to take backup from, then think about the location of it going, like a folder or in another device.
if stands for input file.
of stands for output file.
By issueing the following command, we will backup our second drive into ~/.
dd if=/dev/sdb of=~/test.img
To restore it, simply swap /dev/sdb with ~/test.img, so simple!
You can also change the block size by using the bs command, eg:
dd if=/dev/sdb of=~/test.img bs=512 
Read more →

Saturday, October 19, 2013

Vodaphone USB Broadband on Linux

,
What you will need:

  1. usb-modeswitch-2.0.1.tar.bz2
  2. usb_modeswitch-data
  3. libusb-1.x
Right after you install those files on your linux box, append these three lines in a terminal:
usb_modeswitch -WD -v 12d1 -p 1526 -n -M 555342437f0000000002000080000a11062000000000000100000000000000 -I -w 500
modprobe option
echo "12d1 14cf" > /sys/bus/usb-serial/drivers/option1/new_id
Open your network manager window, select Mobile Broadband, create a new connection and for connection settings leave them as default, just set the password to 1234.

Plug-in your Vodafone USB and that's it !
                                                                                                                                           [Source]

Read more →

Sunday, October 6, 2013

Disable ICMP ping responces on your linux box

,
Depends on the distribution you use you may be able to disable the ping responce in your box to add some complexity for the attackers or the 'bad guys'. In the video below i am going to show you how to append such configuration in your linux distro.
Disable ping reply
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
Enable ping reply
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all
To make this permanent set the following into /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all = 1
ICMP Message Types
You can find more about ICMP here.

Read more →

Saturday, October 5, 2013

Tips on hardening an enterprise server system

,
Hardening a system is the process of making it more secure from the default configuration; it is a very important for servers. Before some time, security wasn't a primary concern, but with all the viruses and attacks on servers today, administrators need to consider about everything.

Keep the system updated

The risk of not being up to date is huge in the world we live on. Hundreds of vulnerabilities are being discovered day by day by security experts you should be aware of. It doesn't matter if your anti-virus is special or your firewall is wicked sick, trust me, for a hacker it's not a big deal to write some bof and win.
Follow the updates regularly and don't miss a thing, patch every hole. In windows world you may use WSUS feature in your server to serve updates to your network clients, this will save bandwidth in the network and save you before some unwanted patching.

Minimize the threat

A server should be installed only for the exact needs, if you're dealing with a server which you obviously don`t know what goes in and out, you're finished. Only the required services and protocols should work fine, rest should be disabled or removed. If you're working on windows environment, make sure to use group policy and the security configuration wizard to help you.

  1. Use DMZ,.. demilitarization zone is a network added prior to the internal 'protected' network for extra security.
  2. Use Firewalls, play your game and create your own rules in order to win. Policy-based filtering, iptables etc.

This tool should help your windows computers.
Read more →

Thursday, October 3, 2013

Enable TCP SYN cookie protection on your linux server

,
Normally when a client attempts to start a TCP connection to a server, the client and server exchange a series of messages which normally runs like this:
  1. The client requests a connection by sending a SYN (synchronize) message to the server.
  2. The server acknowledges this request by sending SYN-ACK back to the client.
  3. The client responds with an ACK, and the connection is established.
This is called the TCP three-way handshake, and is the foundation for every connection established using the TCP protocol.
A SYN flood attack works by not responding to the server with the expected ACK code. The malicious client can either simply not send the expected ACK, or by spoofing the source IP address in the SYN, causing the server to send the SYN-ACK to a falsified IP address - which will not send an ACK because it "knows" that it never sent a SYN.

The server will wait for the acknowledgement for some time, as simple network congestion could also be the cause of the missing ACK, but in an attack increasingly large numbers of half-open connectionswill bind resources on the server until no new connections can be made, resulting in a denial of service to legitimate traffic. Some systems may also malfunction badly or even crash if other operating system functions are starved of resources in this way.

The protection should be enabled by default in many distros.




Commands used:
sysctl -n net.ipv4.tcp_syncookies
nano /etc/sysctl.conf
sysctl -p

Read more →

Friday, July 19, 2013

RDC authentication bypass

,
This is not a hack.
  1. Open up a command prompt and type mstsc.exe.
  2. Click on Options drop down menu to access advanced options about the connection.
  3. Save the connection settings by clicking Save As..., somewhere in your desktop.
  4. Right click this .rdp file now and open it using notepad
  5. Find authentication level:i:2 and turn it into authentication level:i:0.
  6. Add enablecredsspsupport:i:0 at the end of the text file.
  7. Then, open the rdp file which we've just edited and connect to the remote computer.
  8. If it asks you for a password, enter the password of your local user account.
done!

Read more →

Sunday, July 14, 2013

Reduce MTU size to accept 802.1Q or ISL

,
InterSwitchLink and 802.1Q are two different protocols for trunks between network devices, though they cause some problems when they are not configured properly...

In order not to cause frame errors so packets can be accepted in the RX line, you have to reduce the MTU size if you are working with cheap equipment or non-cisco devices.

I wont explain the 'how-to' because devices vary, just a reminder :)
Read more →

Tuesday, July 2, 2013

Export - Import a DHCP database on a Windows Server

,


Moving to another server? Backing up a windows server? Here you go:


1.
netsh dhcp server export c:\dhcpbackup.txt all

2. do not create a new scope in the dialogue, we're restoring a backup, remember?

3. after you disable your old dhcp server:

4.
netsh dhcp server import c:\dhcpbackup.txt all

Problems found:
If:
"An Internal Error Occurred"
then:
delete the following entries inside the txt before restoring:

006 DNS Server
015 DNS Domain Name
Read more →

Thursday, June 13, 2013

Control a windows service remotely

,
Too many standups moving inside a networking environment to control services on different windows machines. This post will show you how to control a service remotely.
Let's find out what's the name of the service which we're trying to control, to do so:
sc.exe \\HOSTNAME query
sc.exe is a service control application included in windows to control services in a remote computer.
The previous command will query the computer 'hostname' to show all of it's available services and statuses.

Now, it's time to control the service:
sc.exe \\HOSTNAME stop "NAMEOFSERVICE"

The full available control commands are available at "sc.exe /?"
Read more →

Monday, May 20, 2013

NSS Labs tested 5 top browsers vs malware

,
As the first line of defense against malware infection, browsers must provide a strong layer of protection. NSS tested the effectiveness of five leading web browsers against 754 samples of real-world malicious software, and the results show significantly differing protection capabilities.


Source
Read more →

Wednesday, May 15, 2013

Unable to connect to network - Rebuild the TCP/IP stack

,
There's a bug when you just connect to a network but no packets are sent, nothing is happening, you havent got an IP address and nothing seems to be working... is the NIC broken? Check below how to fully reset the TCP/IP stack in order to get some things working back again:

  1. Go SafeMode & Networking.
  2. Delete these keys from regedit:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Winsock
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Winsock2
  1. Open the nettcpip.inf file in your %winroot%/inf folder
    (%winroot% is usually c:/windows).
  2. Find the [MS_TCPIP.PrimaryInstall] section. Change the Characteristics value from 0xA0 to 0x80.
  3. Open the properties of the network connection you want to fix. In the General tab, click on the Install button. Click on the Have Disk button, and point the location to %winroot%/inf. After that select TCP/IPv4.
  4. Now you are able to uninstall TCP/IP, do it and reboot.
  5. Go back to your network connection, and install TCP/IP again & reboot, things must be working now.
  6. Open cmd and type the last thing to reset the txtlog:
netsh int ip reset resetlog.txt

Are you connected now? :)

Read more →

Tuesday, May 14, 2013

How-to remotely enable RDC in a LAN

,
Are you an administrator of a network who`d like to sit in his chair a bit longer without the disturbing movements inside that place? How about working remotely without effort? heh, enable Remote Desktop in this LAN easily:
  1. Log into a windows machine as an Administrator and start Registry Editor.
  2. Click on File menu and choose Connect to Network Registry.
  3. Type the host name of the remote computer or browse computers over the network by clicking “Advanced” button, then click ok.
  4. Find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server.
  5. Find fDenyTSConnection, 1 = disabled, 0 = enabled, choose wisely :)
  6. You have turned RDP on in the remote machine.
There's also another, faster method:
reg add "\\COMPUTERNAME\hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0r
Change the underlined COMPUTERNAME with the target network computer, hf.
Read more →

Saturday, April 27, 2013

Mikrotik DynDNS configuration how-to

,

Mikrotik is so powerful but unfortunately it doesn't support dynamic DNS service without using a script...
I had to create a full new config before some days so i was searching for the DDNS option but couldn`t find a thing.

So after our dear friend google there seems to be a script to bypass this limit:




# Set needed variables
:local username "yourusername"
:local password "yourpassword"
:local hostname "yourdyndnsorgname.dyndns.org"
:global systemname [/system identity get name]

:if ($systemname = "Site1" ) do= {
:set hostname "yourdomain1.dyndns.org"
}
:if ($systemname = "Site2" ) do= {
:set hostname "yourdomain2.dyndns.org"
}
:if ($systemname = "Site3" ) do= {
:set hostname "yourdomain3.dyndns.org"
}

:global dyndnsForce
:global previousIP

# print some debug info
:log info ("UpdateDynDNS: username = $username")
:log info ("UpdateDynDNS: password = $password")
:log info ("UpdateDynDNS: hostname = $hostname")
:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "" -1]
:local currentIP [:pick $result $startLoc $endLoc]
:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details available at http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/dyndns.txt"
:local result [/file get dyndns.txt contents]
:log info ("UpdateDynDNS: Dyndns update needed")
:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
:put ("Dyndns Update Result: ".$result)
} else={
:log info ("UpdateDynDNS: No dyndns update needed")
}
After we save the script, we have to add a new scheduled job in the event which we just made with an interval of.. let's say... 15 minutes?

Now you can 'remote access' easily.
Read more →

Tuesday, April 9, 2013

Kali linux - No action for laptop lid

,
So i was trying to figure out the actions of my laptop's lid without going in a deep mode terminal way again..., after a long search nothing seemed to be working..., tried several tools but none of them were actually changing the action of the lid.
So after some days i came accross the gnome-tweak-tool which i've already used in the past and now turns out to be really helpful...

apt-get install gnome-tweak-tool | gnome-tweak-tool

Under Shell you should be able to find:
'Laptop lid close action on battery'
'Laptop lid close action when on AC'

Again, this is a bug found in some hardware, if you haven't found the option in the menu then try this.
Read more →

Useful console commands for Windows

,
Here is a list of console commands for almost any version of Windows:

Accessibility Options: access.cpl
Add Hardware: hdwwiz.cpl
Add / Remove Programs: appwiz.cpl
Administrative Tools: control admintools
Automatic Updates: wuaucpl.cpl
Wizard file transfer Bluethooth: fsquirt
Calculator: calc
Certificate Manager: certmgr.msc
Character: charmap
Checking disk: chkdsk
Manager of the album (clipboard): clipbrd
Command Prompt: cmd
Service components (DCOM): dcomcnfg
Computer Management: compmgmt.msc
DDE active sharing: ddeshare
Device Manager: devmgmt.msc
DirectX Control Panel (if installed): directx.cpl
DirectX Diagnostic Utility: dxdiag
Disk Cleanup: cleanmgr
Disk Defragmenter: dfrg.msc
Disk Management: diskmgmt.msc
Partition manager: diskpart
Display Properties: control desktop
Properties of the display (2): desk.cpl
Properties display (tab "appearance"): control color
Manager vérirficateur drivers: check
Event Viewer: eventvwr.msc
Verification of signatures of files: sigverif
Findfast (if present): findfast.cpl
Folder Options: control folders
Fonts (fonts): control fonts
Fonts folder windows: fonts
Group Policy: gpedit.msc
Internet Properties : inetcpl.cpl
IP Configuration: ipconfig
Keyboard Properties: control keyboard
Local Security Settings: secpol.msc
Local Users and Groups: lusrmgr.msc
Logout: logoff
Properties of the mouse: main.cpl // control mouse
Network Connections: ncpa.cpl
Notepad : notepad
Screen Keyboard: osk
Monitor performance: perfmon.msc
Power Options: powercfg.cpl
Printers and Faxes: control printers
Regional and Language Options: intl.cpl
Editor of the registry: regedit
Remote desktop connection: mstsc
Security Center: wscui.cpl
Console management services: services.msc
Shared folders: fsmgmt.msc
System Configuration Utility : msconfig
System File Checker (SFC =) (Scan Now): sfc /scannow
SFC (Scan next startup): sfc /scanonce
SFC (Scan each démarraget): sfc /scanboot
SFC (back to default settings): sfc /revert
SFC (purge cache files): sfc /purgecache
SFC (define size CAHC x): sfc /cachesize = x
System Properties: sysdm.cpl
Task Manager: taskmgr
Telnet client: telnet
Windows firewall: firewall.cpl
Windows Management Infrastructure: wmimgmt.msc
Protection of the accounts database: syskey
Date and Time Properties: timedate.cpl

Commands for scripting or fast editing some pesky things... hf.
Read more →

Sunday, April 7, 2013

Backup - Restore MySQL databases easily

,
As an IT there should be enough computers running MySQL which you would like to take care or maybe advantage easier than just looking around the fs without idea...
Let's say you hack into a system and all you do is their database! Hah, i am kiding, though, we would like to backup this database for security reasons.... How's the fast way? or How can we do this in a script?


Below are some commands that may be handy from time to time for those who doesn't already know..


Backup MySQL Database
# mysqldump -u(username) –p(password) (databasename) > (dumpfile.sql)

Backup all MySQL Databases
# mysqldump -u(username) –p(password) --all-databases > (dumpfile.sql)

Backup a Remote MySQL Database
 # mysqldump -h(hostip) -u(username) –p(password) (databasename) > (dumpfile.sql)

Restore MySQL Database
# mysql -u(username) –p(password) (databasename) < (dumpfile.sql)

Restore a database that already exist on the target machine
# mysqlimport -u(username) –p(password) (databasename) < (dumpfile.sql)
Read more →

Saturday, March 30, 2013

Five reasons you should never work as an IT for free

,
We've all done it. A friend, a neighbor, a relative, a good client, a bad client, a pretty girl... Whoever it was, and for whatever reason, we all threw them a technological bone and fixed something for free. In rare instances, it can be a rewarding experience. Perhaps your buddy gave you a beer. Maybe someone said thank you. Maybe there was a smile on their face, and that was rewarding enough.

More likely, however, that five minute task you thought you were signing up for turned into 40 minutes, then an hour, then a commitment. Wow. You didn't see that coming.


You Break it You Bought it.
When you sit down to fix a problem that presented as a simple one you are creating a contract. Not a legal contract, but a social one. The computer owner is trusting their computer with you. It's their baby, and you're the doctor. So you sit down, and begin to fix a problem.
In the process, something else breaks. You fixed one thing, but something else goes awry. What's the best part? Neither you nor the user notice it is broken until a day later when they call you to blame you for breaking something else.
"I thought you were going to fix it." They complain.
This is the primary reason you charge money to fix something. You break it, you bought it. The user / owner will expect you to warranty your service even though THEY received all the value of your time, and you received nothing in exchange.

People don't respect things that are free.
I learned that quote from a man who runs a non-profit organization. Image that. A man who solicits donations for a living candidly told me "people don't respect things that are free." You know what? He's right. Free advice. Free upgrade. Free entry. None are valued. Free advice is seldom wanted. Free upgrade was something you were going to get anyway. Free entry? The band playing tonight must not be any good. People associate the value of service with the amount of money that is exchanged for it. How else do you think that lawyer can get away with charging $400 an hour? People naturally make the assumption that if it costs an arm and a leg, then it must be worth it. So, if customers and friends will assume that the most expensive car is the best one, what will they assume of the free car? Do you want the heart surgeon who charges $500,000 per surgery or the one who works for beer to operate on your mother?

They will expect it forever.
In law, the concept of a precedent is vitally important. Judges and lawyers look to previous cases to decide what the interpretation of the law was because if a case was settled one way before, chances are, it will be settled that way again.Gamblers playing craps look at the past behavior of the dice to, mistakenly, assume that the good luck will continue. Users will figure if you fixed it once for free, you'll do it forever for free. There is no reason why they should respect the thousands of hours you have spent learning and researching the art of computer science. There is no reason that they should respect the certifications you hold. There is no reason that they should honor your abilities by paying your fees. Why? Because you did it for free. Once!
When they come back and you try to get fees, they will meet you with resistance in the form of guilt. "I thought we were friends" they cry. "You didn't charge me anything last time." They argue.
Setup the expectation that they are going to pay (or barter) from the onset. Demand the respect that you deserve. Make sure they understand you are a professional. After all, that is the difference between a professional and an amateur. Professionals get compensated for their skills.

The demands will only grow with time.
Give them an inch, and they will take you through three operating system upgrades, two virus infections, and a crashed hard drive. Once you've set the precedent and created the expectation that you are their knight in shining armor, they will begin to call you for everything. They will suck up your time and resources. They will not be grateful. They will involve you in 30 minute hypothetical conversations then disagree with your expertise.

It Weakens Your Backbone
Working for free is not only unprofitable, it weakens your constitution as a professional consultant. For many consultants, asking for money is difficult. They email out a silent invoice after the fact and hope they get paid. This practice can lead to unbalanced books, debt, and a going out of business sign. The simple fact is: if you don't ask for your money, you're not going to get paid. No one just hands out checks. Setting up the expectation, especially when you fix a computer for the first time for a client, is vitally important in establishing boundaries that ensure you are paid in a timely fashion. Working for free, throwing out freebies, "comp"-ing your time hurts your ability to ask for the sale. It hurts your credibility because the client will assume that if you're not charging them for a given task, you didn't know what you were doing or you made mistakes.
It may give you butterflies, but ask for the money. Do it openly and notoriously. Your clients will take it as a sign of confidence.

Taken from http://www.experts-exchange.com/ .
Read more →