Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions modules/generators/network/pcap/secgen_local/local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,22 @@ def packetgen(type, data)

def datagen
data_types = [
Faker::Dota.quote,
Faker::BackToTheFuture.quote,
Faker::BojackHorseman.quote,
Faker::Games::Dota.quote,
Faker::Movies::BackToTheFuture.quote,
Faker::TvShows::BojackHorseman.quote,
Faker::ChuckNorris.fact,
Faker::DrWho.quote,
Faker::DumbAndDumber.quote,
Faker::FamilyGuy.quote,
Faker::Friends.quote,
Faker::GameOfThrones.quote,
Faker::HitchhikersGuideToTheGalaxy.quote,
Faker::HowIMetYourMother.quote,
Faker::Lebowski.quote,
Faker::MostInterestingManInTheWorld.quote,
Faker::RickAndMorty.quote,
Faker::Simpsons.quote,
Faker::StrangerThings.quote,
Faker::TheITCrowd.quote
Faker::TvShows::DrWho.quote,
Faker::TvShows::FamilyGuy.quote,
Faker::TvShows::Friends.quote,
Faker::TvShows::GameOfThrones.quote,
Faker::Movies::HitchhikersGuideToTheGalaxy.quote,
Faker::TvShows::HowIMetYourMother.quote,
Faker::Movies::Lebowski.quote,
Faker::Quote.most_interesting_man_in_the_world,
Faker::TvShows::RickAndMorty.quote,
Faker::TvShows::Simpsons.quote,
Faker::TvShows::StrangerThings.quote,
Faker::TvShows::TheITCrowd.quote
]
data_types.sample.dump.to_s
end
Expand Down Expand Up @@ -95,7 +94,8 @@ def encode_all
# Put packets in pcap file and return contents.
file_contents = ''
pfile = PacketFu::PcapFile.new
pcap_file_path = GENERATORS_DIR + 'network/pcap/files/packet.pcap'
# Use temp directory and create a unique filename to avoid conflicts
pcap_file_path = "#{TMP_DIR}/packet_#{Process.pid}_#{Time.now.to_i}.pcap"
res = pfile.array_to_file(:filename => pcap_file_path, :array => @pcaps, :append => true)
file_contents = File.binread(pcap_file_path)
File.delete(pcap_file_path)
Expand Down
40 changes: 33 additions & 7 deletions scenarios/ctf/analyse_this.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xsi:schemaLocation="http://www.github/cliffe/SecGen/scenario">

<name>Putting it together</name>
<author>Rosie Fletcher</author>
<author>Z. Cliffe Schreuders</author>
<description>Analyse the files on the server from kali.
Username: analyse
Expand Down Expand Up @@ -58,17 +59,22 @@
</input>
</utility>

<!-- This is a decryption lab so CyberChef is needed -->
<utility module_path=".*/iceweasel">
<input into="accounts">
<value>{"username":"kali","password":"kali","super_user":"true","strings_to_leak":[],"leaked_filenames":[]}</value>
</input>
<input into="autostart">
<value>false</value>
<value>true</value>
</input>
<input into="start_page">
<value>file:///opt/cyberchef/CyberChef.html</value>
</input>
</utility>

<utility module_path=".*/kali_top10"/>
<utility module_path=".*/kali_web"/>
<utility module_path=".*/cyberchef"/>

<network type="private_network">
<input into="IP_address">
Expand All @@ -87,7 +93,7 @@

<system>
<system_name>server</system_name>
<base distro="Debian 10" type="desktop" name="KDE"/>
<base distro="Debian 12" type="desktop" name="KDE"/>

<!-- strong password -->
<input into_datastore="username">
Expand Down Expand Up @@ -140,6 +146,16 @@

<!-- Release pcap file -->
<vulnerability type="pcap">
<input into="account">
<generator type="account">
<input into="username">
<datastore>username</datastore>
</input>
<input into="password">
<datastore>password</datastore>
</input>
</generator>
</input>
<input into="base64_file">
<generator type="pcap_generator">
<input into="strings_to_leak">
Expand All @@ -153,18 +169,28 @@
<input into="leaked_filename">
<value>capture.pcap</value>
</input>
<input into="storage_directory">
<value>/home/analyse/</value>
</input>
</vulnerability>

<vulnerability module_path=".*hidden_file.*">
<input into="storage_directory">
<value>/home/analyse/</value>
<input into="account">
<generator type="account">
<input into="username">
<datastore>username</datastore>
</input>
<input into="password">
<datastore>password</datastore>
</input>
</generator>
</input>
<input into="strings_to_leak">
<generator type="flag_generator"/>
</input>
<input into="leaked_filenames">
<value>secret</value>
</input>
<input into="challenge_name">
<value>find_it</value>
</input>
</vulnerability>

<network type="private_network" >
Expand Down