Skip to content

Commit 1097c14

Browse files
committedJul 13, 2021
Reorder profiles and rename paranoid profile

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed
 

Diff for: ‎src/main/java/dk/aau/netsec/hostage/persistence/ProfileManager.java

+22-24
Original file line numberDiff line numberDiff line change
@@ -540,18 +540,19 @@ public void fillWithDefaultData() {
540540
addNuclearPlantProfile();
541541
addModbusMasterProfile();
542542
//addSNMPProfile();
543-
addParanoidProfile();
543+
addVigilantProfile();
544544
addMQTTBrokerProfile();
545545
addMQTTSensorProfile();
546546
addSmokeSensorProfile();
547547
addArduinoProfile();
548+
addWaterPlantProfile();
548549

549550
persistData();
550551
}
551552

552553
private void addWindowsSevenProfile() {
553554
Profile windowsSeven = new Profile(
554-
0,
555+
27,
555556
"Windows 7",
556557
MainActivity.getInstance().getString(R.string.profile_seven_desc),
557558
R.drawable.ic_profile_vista,
@@ -566,7 +567,7 @@ private void addWindowsSevenProfile() {
566567

567568
private void addWindowsXPProfile() {
568569
Profile windowsXP = new Profile(
569-
1,
570+
28,
570571
"Windows XP",
571572
MainActivity.getInstance().getString(R.string.profile_xp_desc),
572573
R.drawable.ic_profile_xp,
@@ -582,7 +583,7 @@ private void addWindowsXPProfile() {
582583

583584
private void addServerHTTPProfile() {
584585
Profile serverHTTP = new Profile(
585-
2,
586+
19,
586587
"Web Server Apache",
587588
MainActivity.getInstance().getString(R.string.profile_webserv_apache_desc),
588589
R.drawable.ic_profile_apache,
@@ -599,7 +600,7 @@ private void addServerHTTPProfile() {
599600

600601
private void addServerWebProfile() {
601602
Profile serverWeb = new Profile(
602-
3,
603+
20,
603604
"Web Server IIS",
604605
MainActivity.getInstance().getString(R.string.profile_webserv_iis_desc),
605606
R.drawable.ic_profile_apache,
@@ -616,7 +617,7 @@ private void addServerWebProfile() {
616617

617618
private void addUnixMachineProfile() {
618619
Profile unixMachine = new Profile(
619-
4,
620+
21,
620621
"\"Hardened\" Linux system ",
621622
MainActivity.getInstance().getString(R.string.profile_linux_hard_desc),
622623
R.drawable.ic_profile_unix,
@@ -631,7 +632,7 @@ private void addUnixMachineProfile() {
631632

632633
private void addLinuxMachineProfile() {
633634
Profile linuxMachine = new Profile(
634-
5,
635+
22,
635636
"Linux system",
636637
MainActivity.getInstance().getString(R.string.profile_linux_desc),
637638
R.drawable.ic_profile_linux,
@@ -650,7 +651,7 @@ private void addLinuxMachineProfile() {
650651

651652
private void addVoipServer() {
652653
Profile voipServer = new Profile(
653-
6,
654+
23,
654655
"VOIP Server",
655656
MainActivity.getInstance().getString(R.string.profile_voip_desc),
656657
R.drawable.ic_profile_asterisks,
@@ -665,7 +666,7 @@ private void addVoipServer() {
665666

666667
private void addRandomProfile() {
667668
Profile randomProfile = new Profile(
668-
7,
669+
30,
669670
"Random",
670671
MainActivity.getInstance().getString(R.string.profile_random_desc),
671672
R.drawable.ic_launcher,
@@ -694,6 +695,10 @@ private void addNuclearPlantProfile() {
694695
nuclearPlant.mActiveProtocols.put("S7COMM", true);
695696
nuclearPlant.mActiveProtocols.put("SMTP", true);
696697

698+
//Activate as default profile
699+
nuclearPlant.mActivated = true;
700+
this.activateProfile(nuclearPlant, false);
701+
697702
this.addProfile(nuclearPlant, false);
698703
}
699704

@@ -746,27 +751,20 @@ private void addSNMPProfile() {
746751
this.addProfile(SNMPProfile, false);
747752
}
748753

749-
private void addParanoidProfile() {
750-
Profile paranoidProfile = new Profile(
751-
12,
752-
"Paranoid",
753-
MainActivity.getInstance().getString(R.string.profile_paranoid_desc),
754-
R.drawable.ic_profile_paranoid,
754+
private void addVigilantProfile() {
755+
Profile vigilantProfile = new Profile(
756+
29,
757+
"Vigilant",
758+
MainActivity.getInstance().getString(R.string.profile_vigilant_desc),
759+
R.drawable.ic_profile_vigilant,
755760
false
756761
);
757762

758763
for (String protocol : MainActivity.getContext().getResources().getStringArray(R.array.protocols)) {
759-
paranoidProfile.mActiveProtocols.put(protocol, true);
764+
vigilantProfile.mActiveProtocols.put(protocol, true);
760765
}
761766

762-
//TODO look here
763-
paranoidProfile.mActivated = true;
764-
765-
this.addProfile(paranoidProfile, false);
766-
767-
mIncrementValue = 8;
768-
769-
this.activateProfile(paranoidProfile, false);
767+
this.addProfile(vigilantProfile, false);
770768
}
771769

772770
private void addMQTTBrokerProfile() {

Diff for: ‎src/main/res/values-de/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
<string name="profile_linux_hard_desc">Dieses Profil immitiert ein Linux System, bei welchem nur SSH aktiv ist</string>
216216
<string name="profile_voip_desc">Dieses Profil immitiert einen VOIP Server, welcher das SIP Protokoll &#252;berwacht</string>
217217
<string name="profile_random_desc">In diesem Profil werden zuf&#228;llige Protokolle aktiviert</string>
218-
<string name="profile_paranoid_desc">Dieses Profil aktiviert alle Protokolle</string>
218+
<string name="profile_vigilant_desc">Dieses Profil aktiviert alle Protokolle</string>
219219
<string name="profile_help_swipe">Swipe von der linken oder rechten Seite um alle Aktionen zu zeigen</string>
220220
<string name="profile_monitor_ghost">&#220;berwache GHOST</string>
221221
<string name="profile_activate_ghost">Aktiviere GHOST &#220;berwachung</string>

Diff for: ‎src/main/res/values/strings.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,19 @@
255255
<string name="profile_vista_desc">This profile will imitate a Windows Vista machine</string>
256256
<string name="profile_seven_desc">This profile will imitate a Windows 7 machine</string>
257257
<string name="profile_xp_desc">This profile will activate Windows XP typical services</string>
258-
<string name="profile_webserv_http_desc">This profile will imitate a simple webserver, which just supports the HTTP protocol</string>
258+
<string name="profile_webserv_http_desc">This profile will imitate a simple webserver, which only supports the HTTP protocol</string>
259259
<string name="profile_webserv_apache_desc">This profile will imitate an apache web server</string>
260260
<string name="profile_webserv_iis_desc">This profile will imitate an IIS web server</string>
261261
<string name="profile_webserv_desc">This profile will imitate a simple webserver, which supports both the HTTP and HTTPS protocol</string>
262262
<string name="profile_unix_desc">This profile monitors unix typical services</string>
263263
<string name="profile_linux_desc">This profile will imitate a linux machine by monitoring linux typical services</string>
264-
<string name="profile_linux_hard_desc">This profile will imitate a linux machine which has just SSH activated</string>
264+
<string name="profile_linux_hard_desc">This profile will imitate a linux machine which has only SSH activated</string>
265265
<string name="profile_voip_desc">This profile imitates a VOIP Server by monitoring the SIP service</string>
266266
<string name="profile_random_desc">This profile monitors services randomly</string>
267267
<string name="profile_nuclearPower_desc" translatable="false">This profile simulates the Siemens SIMATIC S7 200 PLC working in a Nuclear Power Plant Environment</string>
268268
<string name="profile_waterPlant_desc" translatable="false">This profile simulates the PLC infrastructure of a Water Distribution and Treatment Plant </string>
269269
<string name="profile_modbusMater_desc" translatable="false">This profile simulates a MODBUS Master system that controls PLCs in a ICS SCADA environment</string>
270-
<string name="profile_paranoid_desc">This profile monitors all available services</string>
270+
<string name="profile_vigilant_desc">This profile monitors all available services</string>
271271
<string name="profile_help_swipe">Swipe from the left or right on an item to expose all available actions for an item</string>
272272
<string name="profile_monitor_ghost">Monitor GHOST</string>
273273
<string name="profile_activate_ghost">Activate GHOST monitoring</string>

0 commit comments

Comments
 (0)
Please sign in to comment.