‫Instructor: Hi. Within this lecture,
‫we are going to see how we can get the collection name
‫for our firestore database with the apktool.
‫So I have demonstrated how you can hack
‫into the application, hack into the database
‫using the project ID that we have found.
‫But in fact, you need to find the collection name as well,
‫in order to do that.
‫So if you go to small, if you go to Dalvic bytecodes
‫over here, as you can see the ProGuard is in use
‫so it's a little bit obfuscated over here.
‫But it won't do much in the the Dalvik bytecodes
‫so I'm gonna go directly for the COM and my name
‫and then the app itself.
‫So make sure you find COM, your name, the app name
‫and then the files, like this.
‫So over here we see the feed signup, tweet activities,
‫and if you can see the names then of course,
‫you can't browse all of them but most probably,
‫the tweet activity will be the one
‫that actually sends the tweets to the firestore.
‫If you cannot find it in your first trial, then it's good.
‫Maybe you can just wander around a little bit,
‫just see everything that you have in your case.
‫But I'm gonna go for a tweet activity
‫just to make things not complicated.
‫So open the tweet activity small file
‫and you will get to see the Dalvik bytecode.
‫So we have looked over Dalvik bytecodes before
‫and as you can see, we have the same kind of annotation,
‫same kind of syntax over here as well.
‫There's nothing fancy.
‫So we have the own create methods and let's see
‫if we have something different over here,
‫like a string or a value or some kind of passwords
‫or some leads, some hints, some clue that can lead us
‫to the collection name.
‫Okay. And over here,
‫we see the firebase authentication objects
‫and over here, we see the tweet button clicked.
‫So this is exactly the method that we are looking for.
‫In real life, you will see this kind of clear method names
‫as well because most of the times, developer will choose
‫great names for their buttons or stuff, some of their views
‫in order to be clear, in order to be exact.
‫Okay, so we see the firebase authentication
‫and it clearly has something to do with the user.
‫And over here, we see the tweet button clicked
‫and it's called by a view, so we know that this is
‫what happens when a user clicks on the tweet button.
‫So this is exactly what we are looking for, it calls
‫for some of the firebase functions.
‫Okay. And if you come over here, scroll down a little bit,
‫you can see it takes the user email, it takes the tweet,
‫like it takes something name to it,
‫it takes something name user email,
‫it takes something like date.
‫And you may understand that it's trying to upload all
‫of these values to the firestore.
‫And again, maybe it won't do much, but it's a great hint.
‫You can note it down, and we see something like this.
‫So this is a constant string and it starts
‫with a capital letter.
‫So that's the general convention
‫for the collection names or class names.
‫So it's worth a shot, right?
‫So if you think that yeah, there may be some other strings
‫over here as well, some other values that we may take
‫into consideration.
‫Yep, you are right. You should note it down
‫and you should try all of them.
‫It's not that very easy to do reverse engineering
‫as I explained before.
‫But in this case, if I was looking at this
‫for the first time, I would've suspect this tweets
‫very much to be a collection name and go for that.
‫Okay? Because it has the capital T over here,
‫it's clearly going to do something after getting all
‫of this information that is needed to upload
‫into the firestore, it's for the shot, as I said before.
‫So this is very important because this is what we need
‫in order to just call the command
‫that I have shown you before in order to get the data
‫from the firestore.
‫We may take the project ID from the Android manifest.
‫We may take the firebase URL from the Android manifest
‫as well, but we need to find this collection name as well
‫from the activities or it can be stored in the values XML
‫as we have found the URL and the other things,
‫we may have found this one as well
‫but in this case it's stored over here.
‫So you can find all of this information with apktool.
‫But again, I'm going to show you an alternative way
‫to find all of this information.
‫This is more guaranteed, by the way.
‫This is a better way to find all of this information.
‫But in case you fail, in case you don't have
‫any other choice, then you are gonna go
‫for network sniffing as well, as we are going to do
‫within the next lecture.