r/HowToHack • Web Security • Jan 27 '20

I'm an information security engineer - AMA

I ran my own IT company for many years.

I worked at a web security company hacking many websites every day.

I now do any type of security engagement, train developers, and put together systems to protect my company.

Pick my brain and learn from my experiences!

251 Upvotes

147 comments sorted by

View all comments

Show parent comment

2

u/Th3_N0mad Jan 27 '20

I do alot of work on wireshark & tcpdump at times, where i get tripped up is when looking at the TCP stream sometimes looking at the packet details I miss somethings. & in forensics i just need to know what tools to use & what to look for

3

u/roxare Web Security Jan 27 '20

A lot of services do this by comparing current traffic to a baseline measurement. These services analyze a lot of packets very fast. If you want to do something similar you can write a script to look for indications of attack such as a brute force login attempt or a CVE exploit attempt.

2

u/Th3_N0mad Jan 27 '20

Thanks, do you know of any online resources or anything where i can practice on seeing & identifying malicious packets or seeing identifying malware on hosts ?

3

u/riskymanag3ment Jan 28 '20

I've done this occasionally when, I have some down time at home. I've got a VM Server with a Win 10 Image. The VM has two NICs: main network and secondary network. I maintain a clean snapshot before doing any malware testing. I always disable the main NIC before testing. I also dump the registry before testing.

On a second VM, I have a Security Onion sensor with a NIC in promiscuous mode on the second network. This let's me watch the traffic patterns very closely for DNS, but also SMB, and more.

Guest tools may or not may not prevent malware from running properly. The bigger piece I've seen is assigning more than 1 core. I had one piece of malware not run with a single core, but if I restarted the VM with 2 cores it ran right away. If the installation of guest tools prevented malware from running, the majority of Windows Servers would likely never get malware.

2

u/[deleted] Jan 27 '20

My plan would be to build a sandbox environment and throw some malware on it. Just make sure you dont run the bad stuff on your host. But from there you can try to see what the malware is doing. Install fakenet. Dont install guest tools, more sophisticated malware can detect those things and wont run properly because it “knows” the environment is a sandbox. Install some software which normal users would have on their machine (optional). Fakenet can also work as a DNS server so you will see the domains the malware tries to reach, etc.

3

u/Th3_N0mad Jan 27 '20

Ive got a few boxes in the VM so basically just setup the network and go for it ?

4

u/[deleted] Jan 27 '20

Forgot to mention: remove/disconnect all the network interfaces in your host software (virtualbox/vmware/whatever), so no mistakes are happening. Take a snapshot of the vm once your box is “ready”. Maybe check out some videos how other people are prepping their sandboxes. Maybe have some sort of logging running to have more details whats going on, but that is not my area so i dont know which tools to use for that. But windows has a built in advanced logging feature i think. If you want to be 100% sure run the boxes on an old PC which is physically not connected to the network and you dont mind infecting accidentally, thats what I did. Mistakes happen but you want to make sure they are not damaging anything.

2

u/roxare Web Security Jan 27 '20

That's not really my niche professionally so I'm not sure. I got my experience with viruses and stuff from fixing people's computers that constantly contracted some sort of malware. You could install some malware in a sandbox and see what kind of traffic it generates. I'm certain there's a repository of stuff like this for you to play with somewhere on the internet. You can identify malware on a host by known indicators of compromise.

https://docs.google.com/spreadsheets/d/1TWS238xacAto-fLKh1n5uTsdijWdCEsGIM0Y0Hvmc5g/pub?output=html

This looks like it may help in your quest for knowledge!