Hacking Articles Tips Tricks Videos Tutorials
468 subscribers
65.8K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
Hacking Articles Tips Tricks Videos Tutorials
Kali Linux Tutorials Digital-Forensics-Lab : Free Hands-On Digital Forensics Labs For Students And Faculty Digital-Forensics-Lab is a Free Hands-On Digital Forensics Labs For Students And Faculty. Features Of Repository * Hands-on Digital Forensics Labs:…
Topics Covered
LabsTopics CoveredSize of PPTsLab 0HTTP Analysis using Wireshark (text)3MLab 1HTTP Analysis using Wireshark (image)6MLab 2Rhion Possession Investigation 1: File recovering9MLab 3Rhion Possession Investigation 2: Steganography4MLab 4Rhion Possession Investigation 3: Extract Evidence from FTP Traffic3MLab 5Rhion Possession Investigation 4: Extract Evidence from HTTP Traffic5M Investigating Email Harassment

The case study is to investigate the harassment email sent by a student to a faculty member. The case is hosted by digitalcorpora.org. You can access the senario description and network traffic from their website. The repository only provides lab instructions.

Topics Covered
LabsTopics CoveredSize of PPTsLab 0Investigating Harassment Email using Wireshark3MLab 1t-shark Forensic Introduction2MLab 2Investigating Harassment Email using t-shark2M Investigating Illegal File Transferring

The case study is to investigate computer memory for reconstructing a timeline of illegal data transferring. The case includes a scenario of transfer sensitive files from a server to a USB.

Topics Covered
LabsTopics CoveredSize of PPTsLab 0Memory Forensics11Mpart 1Understand the Suspect and Accountspart 2Understand the Suspect’s PCpart 3Network Forensicspart 4Investigate Command Historypart 5Investigate Suspect’s USBpart 6Investigate Internet Explorer Historypart 7Investigate File Explorer Historypart 8Timeline Analysis Investigating Hacking Case

The case study, including a disk image provided by NIST is to investigate a hacker who intercepts internet traffic within range of Wireless Access Points.

Topics Covered
LabsTopics CoveredSize of PPTsLab 0Hacking Case8M Investigating Android 10

The image is created by Joshua Hickman and hosted by digital corpora.
LabsTopics CoveredSize of PPTsLab 0Intro Pixel 33MLab 1Pixel 3 Image2MLab 2Pixel 3 Device4MLab 3Pixel 3 System Setting5MLab 4Overview: App Life Cycle11MLab 5.1.1AOSP App Investigations: Messaging4MLab 5.1.2AOSP App Investigations: Contacts3MLab 5.1.3AOSP App Investigations: Calendar1MLab 5.2.1GMS App Investigations: Messaging6MLab 5.2.2GMS App Investigations: Dialer2MLab 5.2.3GMS App Investigations: Maps8MLab 5.2.4GMS App Investigations: Photos6MLab 5.3.1Third-Party App Investigations: Kik4MLab 5.3.2Third-Party App Investigations: textnow1MLab 5.3.3Third-Party App Investigations: whatapp3MLab 6Pixel 3 Rooting5M Investigating Drone DJI

The dataset includes logical files extracted from a DJI controller (mobile device) and a SD card image used by the device. The Drone dataset is created by VTO Labs. The lab covers GPS investigation and cached image retrieval. Note that it is a draft. We will improve the lab later.
LabsTopics CoveredSize of PPTsLab 0DJI Mavic Air Mobile13MLab 1DJI Mavic Air MicroSD Raw2MLab 2DJI Mavic Air MicroSD Encase Format2M Tools

* Commands tested
NameCommandRepositoryInstallation MethodWinewine –versionhttps://source.winehq.org/git/wine.git/CustomVinettovinetto -hhttps://github.com/AtesComp/VinettoCustomimgclipimgclip -hhttps://github.com/Arthelon/imgclipapt installRegRipperrip.pl -hhttps://github.com/keydet89/RegRipper3.0Customized scirptWindows-Prefetch-Parserprefetch.py -hhttps://github.com/PoorBillionaire/Windows-Prefetch-Parser.gitCustompython-evtxevtx_dump.py -hhttps://github.com/williballenthin/python-evtxapt installlibesedb-utilsesedbexport -hhttps://github.com/libyal/libesedbapt installlibpffpffexport -hhttps://github.com/libyal/libpffapt installUSN-Record-Carverusncarve.py -hhttps://github.com/PoorBillionaire/USN-Record-Carverapt installUSN-Journal-Parserusn.py -hhttps://github.com/PoorBillionaire/USN-Journal-Parserapt installtime_decodetime_decode.py -hhttps://github.com/digitalsleuth/time_decodeGit cloneanalyzeMFTanalyzeMFT.py -hhttps://github.com/dkovar/analyzeMFTCustomized scirptlibvshadowvshadowinfo -hhttps://github.com/libyal/libvshadowCustomized scirptINDXParseINDXParse.py –Customized scirptcarving sq[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Topics Covered LabsTopics CoveredSize of PPTsLab 0HTTP Analysis using Wireshark (text)3MLab 1HTTP Analysis using Wireshark (image)6MLab 2Rhion Possession Investigation 1: File recovering9MLab 3Rhion Possession Investigation 2: Steganography4MLab 4Rhion Possession…
lite .dbundark -hhttps://github.com/inflex/undark.gitCustomized scirptstegdetectstegdetect -VCustomized scirptstegbreakstegbreak -VCustomized scirptstego-toolkitjphideCustomized scirptjpsestego-toolkitekjpseekCustomized scirptvolatility-2vol.py -hhttps://github.com/volatilityfoundation/volatility.gitCustomized scirptliblnk-utilslnkinfo -hapt installJLECmdhttps://f001.backblazeb2.com/file/EricZimmermanTools/JLECmd.zipGit clonerecentfilecache-parserhttps://github.com/prolsen/recentfilecache-parserLogFileParserhttps://github.com/jschicht/LogFileParser.gitGit cloneUsnJrnl2Csvttps://github.com/jschicht/UsnJrnl2Csv.gitGit clone
* Other tools installed via apt install python3-pip, leafpad, terminator, sqlite3, tree, xmlstarlet, libhivex-bin, pasco, libhivex-bin, npm, binwalk, foremost, hashdeep, ewf-tools, nautilus Download

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
Hacking Articles
Process Ghosting Attack

IntroductionGabriel Landau released a post on Elastic Security here which talks about a technique through which antivirus evasion was found to be possible. The technique deals with creating a ghost process which is a term used by the author to describe the mechanism of deleting the payload from the disk before running it, essentially making it a ghost. Table of Content* Process Creation and Security Gap
* Executables, Processes, and Threads
* Creation of Process
* Process Ghosting
* Process Ghosting demo using SharpGhosting
* Conclusion Process Creation and Security GapIn the Windows ecosystem, anti-virus solution developers call APIs (like PsSetCreateProcessNotifyRoutineEx) that can intimate their AV solution about the execution of a particular process, however, the callbacks are not sent when the process executes, rather when the first thread within that process is executed. Hence, this gap between the creation of process and sending of notification of their creation to the anti-virus solution is where attackers can implement process ghosting. Executables, Processes, and ThreadsAn executable is that compiled file that contains the program that is to be run by the machine. Executables can have multiple functions to be performed and when each of these functions are run, it is called a process.

A process, in the simplest terms, is an executing program. Each process is linked to a specific PE (exe, dll etc). There can also be multiple processes from a single executable. This can be viewed in task manager -> details.

A thread is the basic unit of a process to which the OS allocates processor time. A thread can execute any part of the process code. Multiple threads exist in a process. Multi-threading means multiple threads running the same part of the process code. Windows supports multi-tasking thus as many threads can be created as many processors are available to run them simultaneously. It can have three states: running, ready and blocked. Creation of ProcessA process can be created in Windows using CreateProcess or NtCreateUserProcess function. This function is a combination of individually modifiable other functions that can operate on handles, section images, threads etc.

For example, CreateProcess (lpApplicationName) defines which application to execute. Process GhostingNow that we have covered the basics, let’s understand how to process ghosting works. It is a technique in which an attacker creates a file (malware), mark it for deletion (delete-pending state), copies/maps a malware into the memory (image section), close the handle (which deletes it from the disk), then create a process from the now-fileless section. Before understanding the attack we must know the following:

* Handles: Used for memory management, these are references to a resource in kernel space. These not only hold the information about a resource but also provides access rights.

int fh = open(“/etc/passwd”, O_RDWR);

fh is a file handle. When we opened a file using the open() function it returned a handle to variable fh. Now fh can be used to perform functions on the file like:

fh.read()

fh.append()

fh.close()

And also, a file being accessed by fh can’t be read, written in or executed by any other handle (or by any other process). fh.close() will close the handle to the file, i.e, the file won’t be accessed.

* Image Section: A section is the mapping of a file into memory. An image section is a special type of section that corresponds to Portable Executable (PE) files, and can only be created from PE (EXE, DLL, etc) files.
* Delete_Pending State: Like read, write, delete state that may exist for a file, Delete_Pending is a state in which a file is yet to be deleted. The file is not deleted yet because a handle may have kept it opened. As soon as[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Hacking Articles Process Ghosting Attack IntroductionGabriel Landau released a post on Elastic Security here which talks about a technique through which antivirus evasion was found to be possible. The technique deals with creating a ghost process which is…
the handle will close, the file will be deleted. No other process can operate on this file in the Delete_Pending state.

Thus, the entire Process Ghosting flow looks like this:

1. Step 1: Create a file using NtCreateFile() function. This would create our intended malware. Also, would give us a file handle. like: hFile = NtCreateFile(C:\Users\a_cha\Desktop\random.exe)

hFile is the handle for this file

1. Step 2: Put the file in a delete_pending state. This can be done using NtSetInformationFile() function. By using the FileDispositionInformation flag, the file will be put in delete pending state. We can use hFile to perform this task on our file.

https://blogger.googleusercontent.com/img/a/AVvXsEjRLF861fOE-s2nlyPQEq0-iaiDQ2O84rdauQpABsio6lxxzUAoZlS6e5fXBA2bizAKHWCtjgDKDucFB1mEIOtM5L-TfMkeF1igO2qbYZ7WlUE6A7YJy92f1D8ar0VW4IqIqpjtY6J69ncsGVNunFj0-9NaMlhbnjKQF47ZBTNysQQxbVIiVldQGp1ZTA=s16000

1. Step 3: Write the payload (malware) to this newly created file. Since the file is in a delete_pending state, as soon as it closes, the data will vanish. But we’ll perform Step 4 before it vanishes!
2. Step 4: Image section of the file is created using function NtCreateSection(hFile, SEC_IMAGE). It can be done like: hSection = NtCreateSection(hFile, SEC_IMAGE). This is why our handle was needed, as NtCreateSection() takes in file handle as input. Now we can delete our handle safely.
3. Step 5: Delete our newly created handle. This would also delete our corresponding file (malware) from the disk, however, a copy of it still exists in the image section.
4. Step 6: Create a new process from the image section. As the code exists in virtual memory, new process can be created using NtCreateProcessEx(hSection) It will be done like hProcess = NtCreateProcessEx(hSection)
5. Step 7: Assign process arguments and environment variables. This is important as, without process arguments and environment variables, OS won’t execute the process and the code stays in a suspended state.
6. Step 8: Create a thread to execute in the process. Can be done using CreateThread() function and supplying starting address of the process to be executed.

Anti-Virus callbacks are invoked and the file blocked as soon as the thread is created for the malware’s execution. Since the thread is created after the file is deleted, anti-virus callbacks will never be invoked. Any attempts by anti-virus to open this file will throw a STATUS_FILE_DELETED error.

IkerSaint created a proof of concept for process ghosting attack called “KingHamlet” which can be downloaded here. This tool first encrypts the file and then perform the attack. Let’s run a quick demo and see how to process ghosting works. Process Ghosting demo using SharpGhostingBased on the methodology explained above, many POCs have come onto the surface since Gabriel’s post on Elastic Security. In this demo, we will be using a C# implementation of Process Ghosting developed by Wra7h. Before you try it, it is essential that you have an older Windows 10 version as Microsoft patched defender detection after this technique came onto the surface. If you are pentesting and find an older Windows 10, well you know what to do!

You can read the code on the github repo here.

https://blogger.googleusercontent.com/img/a/AVvXsEikNpOudadiRpNOSc5N7Ebn6nDftiI6J0ixNlSyykhzE2B6CdD5vF_ODgfobqwgWSUj7VDan97XMjkfFFSwwMqmedJ43Q_klSrsqC9hIIDp1W1Qd2uzlkjsLQCEOoaERlS_wd4up9SJ3HH-kj9NfcJ9ngN3yftP50rmDD6Wod7QRIgypWb3VVEIkGs0HA=s16000

You can compile this source code using the following command:
C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe /out:SharpGhost.exe /unsafe C:\ProcessGhosting\SharpGhosting-main\*.cs
Feel free to change the path as you please. Also, you’d need .NET framework v3.5 to compile it yourself

https://blogger.googleusercontent.com/img/a/AVvXsEj9fRoAZJn1v6hqaKzBP-SpmAQhvjnK26MqIdqcLjRtrlznZEJ5DRzhFNcQFV3ZU0gLMXWhfTGucVOHrUi6xYdb5eg-fOToJRI4Vsv0lKfXHb3Zhe2yzJjOObd_UD6ejs1O6L[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
the handle will close, the file will be deleted. No other process can operate on this file in the Delete_Pending state. Thus, the entire Process Ghosting flow looks like this: 1. Step 1: Create a file using NtCreateFile() function. This would create our…
h4qNp-q8w63AW2KjcF7rOnOb9m0OKnM64RRdaQaWErlN31OL50jfer5Q=s16000

To make things simple and save you the hassle of compilation, I have forked the repo and created an EXE for you, which can be downloaded here. Once you have downloaded the file, we can continue with our demo. As you can see, we have defender active and working.

https://blogger.googleusercontent.com/img/a/AVvXsEhMTJQkdeQTMqCiwr2TGLJ2p523fa0cKSiU1CdzzD2540KnJc3cuQY7Slw_bfegN8poNpYAGPSTGSB4adNvqDvKUYVhqVDhvnLY76MT8vbmuJtXOqqihdFW6mP2j7Js6euYtfW5OsY-yUTBPfALNYZrEpmhcrk3eAPINzlUpTIZri8P4erkpqvGx43nMA=s16000

Now, we can launch our ghost process using the following command:
.\SharpGhost.exe -real ConclusionThe article covered an easy to comprehend theoretical explanation of the nitty-gritty and various coding functions used while launching Process Ghosting PE injection attacks. Soon after this technique was released, Microsoft rolled out patches to fix this issue. This no longer works in the latest windows 10 and windows 11, however, older windows 10 is still being used in organizations and home systems and a smart attacker can take advantage of this. Hence, one must always keep their systems updated and the latest patch installed in their systems. Hope you liked the article. Subscribe to the blog to receive daily updates and thanks for reading.

Author: Harshit Rajpal is an InfoSec researcher and left and right brain thinker. Contact here

The post Process Ghosting Attack appeared first on Hacking Articles.

___________________________
@hacking_Attack
@Hacking_Video
hacking: security in practice
Is THC-Hydra Speed based on GPU?

is THC-HYDRA based on GPU speed and "how many attepmts one is allowed to send to the login page per second" ?

submitted by /u/TobaksPipa
[link] [comments]

___________________________
@hacking_Attack
@Hacking_Video